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

Adds uv.loop_mode function #517

Merged
merged 2 commits into from
Oct 13, 2020
Merged

Adds uv.loop_mode function #517

merged 2 commits into from
Oct 13, 2020

Conversation

SinisterRectus
Copy link
Member

Closes #498.

I originally wrote a loop_running function, but thought that returning the mode is potentially more useful than just true/false, so wrote this instead.

Note thatctx->mode has to be initialized to -1 for this to work as expected. That's a potential point of failure, but I think it will be okay.

Copy link
Member

@squeek502 squeek502 left a comment

Choose a reason for hiding this comment

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

Nice work. Could you add a basic test as well?

@zhaozg zhaozg merged commit fe23373 into master Oct 13, 2020
@zhaozg zhaozg deleted the loop-running branch April 2, 2023 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

An is_loop_running() function
4 participants