Author abo
Recipients
Date 2007-08-03.19:26:27
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Actually, after thinking about it, there may be a way to make _cleanup() threadsafe without using explicit locks by leveraging off the GIL. If _active.pop() and _active.append() are atomic because of the GIL, then _cleanup() can be made threadsafe. To be truely threadsafe it also needs to make sure that _active contains only abandoned popen instances so that _cleanup() doesn't have it's inst.poll() calls collide with other threads that are still using those popen instances. This can be done by havin the popen instances added to _active only by Popen.__del__(), and only removed by _cleanup() when they are done.
History
Date User Action Args
2007-08-23 14:54:37adminlinkissue1731717 messages
2007-08-23 14:54:37admincreate