-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

On 03/28/2014 05:19 PM, Albert Zeyer wrote:
> Hi,
> 
> For some testing environment (in Nodejs but I guess that doesn't 
> matter), where I wanted to force sync execution, I did a small
> hack where I basically try to run a loop with
> `uv_run(uv_default_loop())` in some code which was run itself from
> inside uv_run (via a callback).
> 
> More specifically, if you are interested for the details: Nodejs
> runs a very simple main loop where it basically just calls uv_run
> (see here: https://github.com/joyent/node/blob/master/src/node.cc).
> In uv_run, callbacks get called which call JavaScript code. In that
> JavaScript code, I use the NodeJS uvrun module
> (https://github.com/albertz/uvrun) which exposes the uv_run
> function to JS. And I call that uv_run to have my own inner loop.
> 

That's not going to work. libuv doesn't support calling uv_run
recursively.


> I have some problems with that and I wonder whether the problem
> might be because I call uv_run recursively. It could also be that I
> run it on the wrong event loop but I haven't checked on that one
> yet. Sadly, NodeJS doesn't have any way to expose its event loop,
> so I'm using uv_default_loop().
> 

FWIW I think it's now possible to get the loop in 0.11. It's stored in
the Environment.


Cheers,

- -- 
Saúl Ibarra Corretgé
bettercallsaghul.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iQIcBAEBAgAGBQJTNaIpAAoJEEEOVVOum8BZstYP/1U5PEprg96+KL33LW1bVIQL
2q8Oj0zy9TAMLKwpoWgNcETP37Ml9EkKHv6pijXdyo+h7AI5FGeKhbJ1jqntBkJO
ZGCfI7tJ+EyU1Ld4jKD5QYZPAx/gluow7T/8kyYWK567rHKZMa2TbXmRnVePVIst
pC/AaEooyyQGRSacBt6B2wPzm3kVdQRMSS4cPVy8RZsMkqAsfJBhsia0om5Tn7vf
cBL9Up4xARseLW9rfd8Pv995tZKc9xfsh8kD7vY/5pBA57iCtN6NO6p8bR+CLWct
GLpBKK7KM46y7PQH+dGcQzVDaACOrJj32gmKDY4kz7EeTe/Ck/AE87hL2rrDnJ/L
FM9vLM7bWdDwQnfElKaGyF/CDnlw/vwb/OF3NLPFcfBR3p0ua3ta+4A5cCo7SLUM
mVb8ofTsYFQ1Xq4OWLmoJEHvUoRrxbxdTxweOxUGlxjUP4nhdTAYb+hIeF90mhuE
JDhSu0l8z8SXh2fm23qGoIOehaEli4TRpOZCz+JfOkhNF02rrhcuFmcSzGuAAi8j
gka8PlTkMmLNY/BPnaCyRYromgo4dT07+Z+3AFavE8YnAr25cMpH6iPNG3QR8vpu
izEn8fqZtLbD5KM65FE17cbN6LHilSOdbveQirfP82nfy0o8XPPtPE7vKUvlzAZ6
M3RZyh9zRpuu0w/9+hcq
=ujcj
-----END PGP SIGNATURE-----

-- 
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