Skip to content

Conversation

@algebraic-dev
Copy link
Member

This PR aims to fix the Timer API selector to make it finish as soon as possible when unregistered. This change makes the Selectable.one function drop the selectables array as soon as possible, so when combined with finalizers that have some effects like the TCP socket finalizer, it runs it as soon as possible.

@algebraic-dev algebraic-dev requested a review from hargoniX October 1, 2025 03:28
@algebraic-dev algebraic-dev self-assigned this Oct 1, 2025
@algebraic-dev algebraic-dev requested a review from TwoFX as a code owner October 1, 2025 03:28
@algebraic-dev algebraic-dev changed the title feat: add cancel function to the Timer API to make it behave correctly with finalizers and selectables. fix: add cancel function to the Timer API to make it behave correctly with finalizers and selectables. Oct 1, 2025
@algebraic-dev algebraic-dev changed the title fix: add cancel function to the Timer API to make it behave correctly with finalizers and selectables. fix: add cancel function to the Timer API to make it behave correctly with finalizers and selectables Oct 1, 2025
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Oct 1, 2025
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Oct 1, 2025

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 5ef7b45afaedd794fb39b0fbd70924b573694a00 --onto 7d55c033e1f0ad8cb7c2b9ab72e5db40ce192222. You can force Mathlib CI using the force-mathlib-ci label. (2025-10-01 04:46:57)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 5ef7b45afaedd794fb39b0fbd70924b573694a00 --onto d88e417cda0f7afb1e15c806c6bfdbbb09ba7eef. You can force Mathlib CI using the force-mathlib-ci label. (2025-10-02 00:15:42)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 5ef7b45afaedd794fb39b0fbd70924b573694a00 --onto 0b2193c7715a55246d0596a4db548c1b5b81562a. You can force Mathlib CI using the force-mathlib-ci label. (2025-10-03 15:31:53)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 5ef7b45afaedd794fb39b0fbd70924b573694a00 --onto 54c6efea95a0d478f2659632749035962b1f4d8d. You can force Mathlib CI using the force-mathlib-ci label. (2025-10-07 21:37:21)

@leanprover-bot
Copy link
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase 5ef7b45afaedd794fb39b0fbd70924b573694a00 --onto d3dda9f6d4428a906c096067ecb75e432afc4615. You can force reference manual CI using the force-manual-ci label. (2025-10-01 04:46:58)

Copy link
Member

@TwoFX TwoFX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This clearly needs tests!

@algebraic-dev algebraic-dev requested a review from TwoFX October 2, 2025 01:04
@algebraic-dev algebraic-dev added this pull request to the merge queue Oct 8, 2025
Merged via the queue into leanprover:master with commit 7600d41 Oct 8, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-library Library toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants