This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 sbt
收信人 Jimbofbx, asksol, dragonfyre13, dsvensson, gsson, jnoller, jodal, pitrou, sbt
日期 2012-04-07.18:21:33
SpamBayes Score -1.0
Marked as misclassified
Message-id <1333822894.02.0.934048999921.issue4892@psf.upfronthosting.co.za>
In-reply-to
内容
> But ForkingPickler could be used in multiprocessing.connection,
> couldn't it?

I suppose so.

Note that the way a connection handle is transferred between existing processes is unnecessarily inefficient on Windows.  A background server thread (one per process) has to be started and the receiving process must connect back to the sending process to receive its duplicate handle.

There is a simpler way to do this on Windows.  The sending process duplicates the handle, and the receiving process duplicates that second handle using DuplicateHandle() and the DUPLICATE_CLOSE_SOURCE flag.  That way no server thread is necessary on Windows.

I got this to work recently for pickling references to file handles for mmaps on.  (A server thread would still be necessary on Unix.)
历史
日期 用户 动作 参数
2012-04-07 18:21:34sbt修改recipients: + sbt, pitrou, jnoller, gsson, dsvensson, asksol, jodal, Jimbofbx, dragonfyre13
2012-04-07 18:21:34sbt修改messageid: <1333822894.02.0.934048999921.issue4892@psf.upfronthosting.co.za>
2012-04-07 18:21:33sbt链接issue4892 messages
2012-04-07 18:21:33sbt创建