On Thursday, April 17, 2014 3:06:18 AM UTC-4, Saúl Ibarra Corretgé wrote:
>
> Hi, 
>
>
> > 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. 
> > 
>
> Well, we don't have any "events" abstraction. You can start a timer, 
> create a TCP server, UDP endpoint, and so on. Now if you are not running 
> the loop you'll not get data out of the sockets, for instance. 
>
> > 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? 
> > 
>
> To be honest, I'm not sure how well that would work in practice. It will 
> work with timers, but not so well with network connections, I think. 
>
> uv_run won't tell you if it ran any callback. uv_run will tell you if 
> there are still active handles or requests, which means you need to keep 
> running the loop until the requests are completed or the handles closed 
> (or unref'd). 
>

Thanks for your patience and help.  After poking around a little more, I'm 
pretty sure what I'm going for is very closely related to embedding libuv 
in another event loop.  (The difference being, the "other event loop" in my 
case is a weirder pattern.)  My impression is that embedding is still 
shaking out (for example, it doesn't work on Windows?).  For the time 
being, I think I'll just run the event loop in its default mode in its own 
thread and use asynch events to get messages back and forth.

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.

Reply via email to