joyent/libuv — pull request #669 by saghul (2012-12-26 15:29:27+00:00)
Title: unix: Fix canceling request if it's the only one

This is a fix for the following case (which I surprisingly run into): there is a single request in the thread pool (say a getaddrinfo) and it's cancelled before it gets a chance to run. If no other request is put in the thread pool, the work_async will not be sent and thus the done callback will never be called. The fix consists in sending the async in case the cancelled request is the last request.

I don't know if a reliable test case can be written for this, though :-S

/cc @bnoordhuis