On Saturday, April 12, 2014 12:55:10 AM UTC-7, Saúl Ibarra Corretgé wrote: > Can you elaborate on what you are trying to achieve? What platforms do > you need to support? One possibility would be to use a model similar > to test-embed.c: have the uv loop stopped, create handles from your > main thread, block for i/o on an auxiliary thread (uv_backend_fd + > uv_backend_timeout), signal the main thread, and there uv_run with > UV_RUN_NOWAIT, so that all callbacks are fired.
> There might be other ways to tackle your problem, but without any more > details this is the first thing that came to mind. Well, the set of supported platforms would be all those supported by Node. I'm trying to figure out if it's possible to have JavaScript run off the uv_run() thread. Say, for example, the JS script needs to create a TCP server. It would need to sync up with the uv_run() thread to create the handle and run the server. Ideally I would like to be able to block the uv_run() thread just for the moment of creation so I can immediately get back the result, but if that's not possible then I'll work around it. So I guess the issue I'm trying to tackle is being able to dynamically and safely create handles off the uv_run() thread. -- 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.
