On Wednesday, April 16, 2014 3:45:35 AM UTC-4, Saúl Ibarra Corretgé wrote:
>
> Hi,
>
> On 4/15/14 9:46 PM, Benjamin Ylvisaker wrote:
> > What I would like to write is something like:
> >
> > while( events ready to go right now ) {
> > uv_run( l, UV_RUN_NOWAIT );
> > }
> >
>
> What are you trying to achieve? When you run the loop with UV_RUN_NOWAIT
> it will do a zero timeout poll, so if you just have a timer set for 60
> seconds and a TCP socket you'll busy-loop unnecessarily.
>
What I'm trying to do is make a framework where the main application code
runs along, adding events to the loop when it feels like it. Every once in
a while it takes a little pause to do all the callbacks that are ready to
go right now. Then it goes back to its main application stuff.
I think in order to accomplish this I need to know if uv_run actually
performed any callbacks. Does that make sense? Does it seem like a
reasonable thing to want?
Thanks,
Ben
--
You received this message because you are subscribed to the Google Groups
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.