Skip to content

Change std::timer functions to not require a passed-in uv::global_loop #4385

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

Closed
bstrie opened this issue Jan 8, 2013 · 3 comments
Closed
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup.

Comments

@bstrie
Copy link
Contributor

bstrie commented Jan 8, 2013

< bstrie> is there a reason that you must manually do `uv::global_loop::get()`
          in order to use std::timer::sleep?
< bstrie> feels like that could just as easily live in the sleep function
<@brson> bstrie: yes, the interface needs a redesign
<@brson> if you want to subit the patch that hides the loop from all the timer
         functions that would be fine
<@brson> i did at one point expect to have both, one that takes the loop and one
         that uses the default loop, but maybe it doesn't matter
< bstrie> brson: is it expensive to look up the loop every time? would callers
          benefit from only calling uv::global_loop::get() once and then passing
          that around to all their timer functions?
<@brson> bstrie: it is not particularly expensive to get the loop. the message
         passing and scheduling involved is more expensive
@bstrie
Copy link
Contributor Author

bstrie commented May 28, 2013

Will probably be obviated by the new scheduler, check back once it's done.

@bblum
Copy link
Contributor

bblum commented Jun 10, 2013

(linking to #6435)

@msullivan
Copy link
Contributor

Looks fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

No branches or pull requests

3 participants