Advertisement
Guest User

Untitled

a guest
Aug 17th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. import multiprocessing
  2.  
  3. q = multiprocessing.Queue()
  4.  
  5. for i in range(10000):
  6. q.put("x" * 1000)
  7.  
  8. # Un-commenting the next line lets the program exit
  9. # q.close()
  10.  
  11. print("trying to exit")
  12.  
  13. ^CError in atexit._
  14. run_exitfuncs:
  15. Traceback (most recent call last):
  16. File "/usr/local/lib/python3.7/multiprocessing/util.py", line 265, in _run_finalizers
  17. finalizer()
  18. File "/usr/local/lib/python3.7/multiprocessing/util.py", line 189, in __call__
  19. res = self._callback(*self._args, **self._kwargs)
  20. File "/usr/local/lib/python3.7/multiprocessing/queues.py", line 192, in _finalize_join
  21. thread.join()
  22. File "/usr/local/lib/python3.7/threading.py", line 1044, in join
  23. self._wait_for_tstate_lock()
  24. File "/usr/local/lib/python3.7/threading.py", line 1060, in _wait_for_tstate_lock
  25. elif lock.acquire(block, timeout):
  26. KeyboardInterrupt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement