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.

Author alejolp
Recipients alejolp, georg.brandl
Date 2008-11-12.22:35:21
SpamBayes Score 8.992662e-05
Marked as misclassified No
Message-id <1226529323.41.0.396977390286.issue4311@psf.upfronthosting.co.za>
In-reply-to
Content
The "devel" documentation of the "Multiprocessing" module at the
"Exchanging objects between processes" section has the following example
snippet:

from multiprocessing import Process, Queue

def f(q):
    q.put([42, None, 'hello'])

 if __name__ == '__main__':
     q = Queue()
     p = Process(target=f, args=(q,))
     p.start()
     print q.get()    # prints "[42, None, 'hello']"
     p.join()

The last two lines should be swapped to avoid a race condition:

     p.join()
     print q.get()    # prints "[42, None, 'hello']"

BTW, Nice work. Keep on going folks =)
History
Date User Action Args
2008-11-12 22:35:25alejolpsetrecipients: + alejolp, georg.brandl
2008-11-12 22:35:23alejolpsetmessageid: <1226529323.41.0.396977390286.issue4311@psf.upfronthosting.co.za>
2008-11-12 22:35:22alejolplinkissue4311 messages
2008-11-12 22:35:21alejolpcreate