Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from multiprocessing import Process, Queue
- def f(queue):
- queue.put([42, None, 'hello'])
- if __name__ == '__main__':
- queue = Queue()
- p = Process(target=f, args=(queue,))
- p.start()
- print(queue.get()) # prints "[42, None, 'hello']"
- p.join()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement