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

threadDelay: efficiently remove thread delay timer #86

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

coot
Copy link
Collaborator

@coot coot commented Apr 14, 2023

Unfortunately we cannot track the information on which ThreadDelay
a thread is blocked in threadStatus because it is cleared when
a thread is rescheduled. This is too early. In the scenario we are
interested in, the thread is rescheduled when the thread receives an
exception and it's when we interpret the Throw we need to know the
TimeoutId of that threadDelay.

We add a threadDelayId field, which tracks the last threadDelay id.
This field only cleared when the thread receives an exception, thus it's
life time is long enough to be useful.

@coot coot force-pushed the coot/timer-cancelation branch 2 times, most recently from e51804c to 34ab9c1 Compare April 18, 2023 13:27
Introduce a `DelayFrame` which allows us to access `TimeoutId`.
@coot coot merged commit c4385be into main Apr 18, 2023
@coot coot deleted the coot/timer-cancelation branch April 18, 2023 13:49
@coot coot self-assigned this Apr 18, 2023
Copy link
Contributor

@dcoutts dcoutts left a comment

Choose a reason for hiding this comment

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

Noice!

@coot
Copy link
Collaborator Author

coot commented Jun 2, 2023

I hope the noise isn't too laud 😁.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants