Eryk Sun <eryk...@gmail.com> added the comment:

Steve or Zach, please review PR 23290, submitted by Teugea Ioan-Teodor. It 
modifies the startup sequence for worker processes by creating the child 
process with a suspended thread and pickling process_obj to a BytesIO instance 
before resuming the thread and writing the pickle data to the pipe. If pickling 
fails, the child process is terminated before the thread is resumed, since 
there's no point in allowing the child to execute. 

This doesn't directly address the issue with interpreter startup that can cause 
Python to hang on a synchronous I/O request, but it does avoid the problem.

Alternatively, when there's a pickling error, the parent could close its end of 
the pipe and wait for the child to exit before propagating the exception, but 
I'd rather skip executing the child completely.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42178>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to