Message291294
Expanding my above example to show how multiprocessing relates:
>>> import multiprocessing
>>> import os
>>> class Floof(object):
... def __new__(cls):
... print("New via pid=%d" % os.getpid())
... return object.__new__(cls)
...
>>> os.getpid() # parent pid
46560
>>> pool = multiprocessing.Pool(1)
>>> getter = pool.apply_async(Floof, (), {}) # output seen from child AND parent
>>> New via pid=46583
New via pid=46560
>>> getter.get() # everything seems to be working as intended
<__main__.Floof object at 0x10866f250>
FWIW, near the end of my prior message: s/it didn't merely/it merely/ |
|
Date |
User |
Action |
Args |
2017-04-07 20:58:35 | davin | set | recipients:
+ davin, Charles McEachern |
2017-04-07 20:58:35 | davin | set | messageid: <1491598715.86.0.819546625264.issue30018@psf.upfronthosting.co.za> |
2017-04-07 20:58:35 | davin | link | issue30018 messages |
2017-04-07 20:58:35 | davin | create | |
|