Can anyone knowledgeable about the async PDispatcher help me debug this? It 
should be very easy to clone and run.

> [https://github.com/pb-cdunn/nim-multiproc/tree/never-finish](https://github.com/pb-cdunn/nim-multiproc/tree/never-finish)

Try the _never-finish_ branch. In **multiproc.nim**, if I move the 
`hasPendingOpertions()/poll()` loop ahead of the `finishParent()` loop, then it 
hangs. As it is, it croaks on an unregistered file-descriptor.

I have also filed [this Issue](https://github.com/nim-lang/Nim/issues/5717), 
because I wish I could simply throw away the existing global PDispatcher and 
start over. (Thanks for commenting, dom.)

(By the way, when I get this working and finish it, I plan to submit it to 
Nimble. It will be a constrained but very convenient Nim version of the Python 
_multiprocessing_ library. But let's discuss the API in a separate thread 
later. We might eventually integrate this with @cheatfate's useful [asynctools 
library](https://github.com/cheatfate/asynctools/blob/master/asynctools/asyncpipe.nim).)

Reply via email to