Message157739
ForkingPickler is only used when creating a child process. The multiprocessing.reduction module is only really intended for sending stuff to *pre-existing* processes.
As things stand, after importing multiprocessing.reduction you can do something like
buf = io.BytesIO()
pickler = ForkingPickler(buf)
pickler.dump(conn)
data = buf.getvalue()
writer.send_bytes(data)
But that is rather less simple and obvious than just doing
writer.send(conn)
which was possible in pyprocessing.
Originally just importing the module magically registered the reduce functions with copyreg. Since this was undesirable, the reduction functions were instead registered with ForkingPickler. But this fix rather missed the point of the module. |
|
Date |
User |
Action |
Args |
2012-04-07 17:26:05 | sbt | set | recipients:
+ sbt, pitrou, jnoller, gsson, dsvensson, asksol, jodal, Jimbofbx, dragonfyre13 |
2012-04-07 17:26:05 | sbt | set | messageid: <1333819565.61.0.292996682609.issue4892@psf.upfronthosting.co.za> |
2012-04-07 17:26:05 | sbt | link | issue4892 messages |
2012-04-07 17:26:04 | sbt | create | |
|