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

Timers #12

Open
1 of 8 tasks
archseer opened this issue Jan 25, 2019 · 1 comment
Open
1 of 8 tasks

Timers #12

archseer opened this issue Jan 25, 2019 · 1 comment
Labels
K-enhancement Kind: New feature or request L-medium Level: medium

Comments

@archseer
Copy link
Owner

archseer commented Jan 25, 2019

Timers includes:

  • bif erlang:start_timer/3
  • bif erlang:start_timer/4
  • bif erlang:send_after/3
  • bif erlang:send_after/4
  • bif erlang:cancel_timer/1
  • bif erlang:cancel_timer/2
  • bif erlang:read_timer/1
  • bif erlang:read_timer/2

As well as WaitTimeout and Send with timeout instructions. The implementation should use a hierarchical timing wheel, can probably base the implementation on https://github.com/tokio-rs/tokio/tree/master/tokio-timer/src/wheel

If we decide to integrate with Tokio for the async I/O (yields the BIF when blocking), we could avoid copying the impl. If we copy it, we probably want a new thread that will keep track of the wheel and schedule processes when their timers are up (similar to what process::spawn internals do)

@archseer archseer added K-enhancement Kind: New feature or request L-medium Level: medium labels Jan 25, 2019
@archseer
Copy link
Owner Author

Simple send_after was implemented, but no way to cancel or manipulate timers yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
K-enhancement Kind: New feature or request L-medium Level: medium
Projects
None yet
Development

No branches or pull requests

1 participant