|
|
|
|
|
by chapmanb
5542 days ago
|
|
Thanks for the feedback. I'd be very happy if this inspired better solutions. My goal was to solve a problem that was slowing down my work, and I reached for multiprocessing from my toolbox since that's my first choice to run work in parallel. Since I didn't find an existing implementation, I decided to share it. It would be great to learn from some alternative approaches. |
|
The problem is just one of language and toolkit abstractions. Too many python APIs are blocking unnecessarily with no way out. A non-blocking version of that API would be obvious how to run in parallel (as the twisted one is).
This is part of the reason for node.js' rise in popularity -- or at least reason for existence. He took the other extreme where nothing blocks. The community is coming up with ways to simulate blocking APIs in efforts similar to what you've done to simulate non-blocking APIs in a world full of blocking APIs.