-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gather potential user input #2
Comments
I think this looks great. I did a brief once over of the code base and I actually think this adds even more incentive to decipher what low level parts of I really like that you were able to leverage I think you've helped settled some issues we have in
Let me know what you think 🏄🏼 |
Hmm thinking about this further I wonder if we could use this as a backend as well to sidestep the issues with the current mp forkserver method? That should work right? Is there any reason we can't invoke a new The only drawback I can think of is a lot of lingering threads and that we can't do true sub-proc nesting (which you don't really need as long as you do it logically from I would be super interested to benchmark spawn times versus the current forkserver in mp. |
At the moment, the following code produces the trio wakeup socketpair error on linux import trio
import trio_parallel
import os
import multiprocessing
async def in_worker():
await trio.sleep(.1)
print("look, i'm in worker PID", os.getpid())
async def in_main():
print("started in main PID", os.getpid())
await trio_parallel.run_sync(trio.run, in_worker)
print("back in main PID", os.getpid())
if __name__ == "__main__":
# multiprocessing.set_start_method("forkserver") # fix the problem!
trio.run(in_main)
So fixing that might be a quick solution for a Trio forkserver, if you like living on the edge with risk of deadlock. See #4 for more! |
Some chatter indicates that a worker initialization function could be useful, and possibly dispatching work across a network. These options might better be part of #12. |
Having split this off from python-trio/trio#1783, some people that have been interested in python-trio/trio#1781 should be aware of this new home for my
multiprocessing
-based Trio worker process code.CC @asvetlov, @belm0, @auvipy, @goodboy
I realize y'all are busy people but your input would make all the difference! 😁
The text was updated successfully, but these errors were encountered: