-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/08/2014 08:23 AM, [email protected] wrote: > > Hi, > > Making loop embedding is on my list, unfortunately I haven't got > there yet. The idea I have in mind is to have a uv_backend_poll > function, which just polls for i/o for the given timeout, but > doesn't run any callback. The the user could run the loop again > with UV_RUN_NOWAIT and all callbacks would be fired. > > Here is a similar discussion we had a few months ago: > https://github.com/joyent/libuv/issues/1246 > <https://github.com/joyent/libuv/issues/1246> > > > In the example you give on that issue you have: > > |uv_backend_poll(loop, uv_backend_timeout(loop)); > > What does uv_backend_timeout() do exactly? The documentation says > its the "poll timeout". But what does that mean? Why do you need it > externally to call uv_backend_poll()? Why not just pass your own > timeout or -1?
uv_backend_timeout is already an existing function. It returns the amount of time the loop needs to block for i/o, you can check in the code for the specifics, because it depends on timers, close callbacks, idle handles... You will be free to pass the timeout you want, using uv_backend_timeout is just how uv_run will work internally. - -- Saúl Ibarra Corretgé bettercallsaghul.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iQIcBAEBAgAGBQJTu5YyAAoJEEEOVVOum8BZyRMP/RSF223iylWEMdJSapW+XyBS 7vw0AAJi6fu+X++YyUV8Na/Om1w3468y0RzVSM8z8qDhuBJr5p/K66PlyMiKdh8r +RA+/G2mMNnUugGi9DX9PE+mCmFfeOZvpnYJXWz4N/5JZhHEWoyqroqvbz0FQsIw TscFuFKdQUn9jqA5RRkLUoodn60tgEh75VK1KriCLPOUSqjsOgPpvH6xq65W+GeC eeMYMHxCE4ZyR4/r+eyFx4ekKCb/oQgneYVoi1L/EB8viaNgzlqVG0aMcc7X9bzL uCgSUjszNM7igtNrX/iN3yYErX6eXwwfKz8Fnf934lPGgF9OagjG4BILb1K6FWUk 73VZKUACJfVcnE2Hhl9RvFOVwEomp3WkRP0zQ2RhH83wNhV8aRQqfcmeqsPyJ516 ETsVwpO2dvtn/Lru7CMbI8L9vMGmg/9CyxFK5hH58nuE6o/Xu4YAKLoxc2QBQqaa rt0OuB7urhT/0gtoXgSAuQKMsmgdD+hE0ZoLqUcOwmADRq8FUinDY57vT0k4PYp5 IKmU68MQTNxz+8avnZ7K3T0nSapH7aYgEFdo7nKpjh07axDqP2zFFcrnFFFgkqxq Exr3lOLbxvBw49jYqwWqa9JnODIEXOMSvrWNMz3GwFXsAF2Lrd+39czIUeI2OYrJ 7Q0qGK+IObUJzfVwehVS =9AZd -----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.
