Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
create async loops #2
So, the worker is deleted as a result of
But, you might want to reconsider what you're doing, perhaps you want your JS code to be triggering the re-runs rather than having the C++ side dictating when the loops occur. Another alternative is to use polling, if you dare and have some kind of socket to react to, like the zmq module does: https://github.com/JustinTulloss/zeromq.node/blob/master/binding.cc#L355 (and I do this in node-libssh too but it's much cleaner in the zmmq one).
Thanks @rvagg :-)