Skip to content

Conversation

@karlseguin
Copy link
Collaborator

A loop interval will no longer stop the loop from returning from run, and no longer requires mutating event_nb on each iteration.

Re-enable microtask loop, which I accidentally stopped in a previous commit.

A loop interval will no longer stop the loop from returning from `run`, and
no longer requires mutating event_nb on each iteration.

Re-enable microtask loop, which I accidentally stopped in a previous commit.
events_nb: usize,

// Used to stop repeating timeouts when loop.run is called.
stopping: bool,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@krichprollsch do operations on events_nb really need to be synchronized/atomic? Isn't this all single threaded?

If I'm wrong, I should add atomic operations around stopping too.

Copy link
Member

Choose a reason for hiding this comment

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

Well I guess it was in case of future multi-threads use...
I'm not sure we should maintain it since many other things would break in this case...

@karlseguin karlseguin merged commit 3466325 into main May 7, 2025
12 checks passed
@karlseguin karlseguin deleted the loop_interval_cleanup branch May 7, 2025 23:45
@github-actions github-actions bot locked and limited conversation to collaborators May 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants