Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: asynchronous timer API #6306

Draft
wants to merge 32 commits into
base: master
Choose a base branch
from
Draft

feat: asynchronous timer API #6306

wants to merge 32 commits into from

Conversation

hargoniX
Copy link
Contributor

@hargoniX hargoniX commented Dec 4, 2024

This PR implements a basic asynchronous timer API on top of the libuv work.

It purposely puts this into Std.Internal as we might still have to change the API as we continue develop of the async library across releases so I would only like to stabilize it once we are certain this is a fine API.

A few additional notes:

  • we currently do not implement a bind operator on AsyncTask on purpose as Task.bind on Task.pure is a non trivial operation and users should be aware of it. Furthermore there is the consideration that as they will have to bind on both IO and AsyncTask we might want to make potential task points explicit in the syntax (did somebody say await?).
  • the API generally takes inspiration from https://docs.rs/tokio/latest/tokio/time/index.html, though it has to adapt as Rust's and Lean's asynchronity concepts are sufficiently different.

Stacked on top of #6219.

algebraic-dev and others added 27 commits December 3, 2024 10:42
@hargoniX hargoniX added the changelog-no Do not include this PR in the release changelog label Dec 4, 2024
@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 Dec 4, 2024
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Dec 4, 2024

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 00718c3959d93972b43ee30ac008e9d655d9f151 --onto cb600ed9b436e4290b819b0529f8454490bffeb6. (2024-12-04 14:08:17)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 00718c3959d93972b43ee30ac008e9d655d9f151 --onto 019f8e175f9650b829aca8ee501f41c0a5d9076d. (2024-12-05 17:09:27)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 00718c3959d93972b43ee30ac008e9d655d9f151 --onto 6e60d130845855a9c3263c235bcbcc543b9b5c32. (2024-12-06 16:42:58)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-no Do not include this PR in the release changelog 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.

3 participants