Skip to content

Instantly share code, notes, and snippets.

@zed
Created October 7, 2011 15:33
Show Gist options
  • Select an option

  • Save zed/02134e09bb4db6837eb2 to your computer and use it in GitHub Desktop.

Select an option

Save zed/02134e09bb4db6837eb2 to your computer and use it in GitHub Desktop.
[TOX] /home/u/prj/SO/print_empty_line_threading$ .tox/py26/bin/python test_thread_print.py
.........................................
MainThread: <Thread(Thread-1, initial)>.start(): starting thread
Thread-1: <Thread(Thread-1, started 140524052915968)>.__bootstrap(): thread started
MainThread: <Thread(Thread-2, initial)>.start(): starting thread
Thread-2: <Thread(Thread-2, started 140524044523264)>.__bootstrap(): thread started
MainThread: <Thread(Thread-3, initial)>.start(): starting thread
Thread-3: <Thread(Thread-3, started 140524036130560)>.__bootstrap(): thread started
a
MainThread: <Thread(Thread-1, started 140524052915968)>.join(): waiting until thread stops
Thread-1: <Thread(Thread-1, started 140524052915968)>.__bootstrap(): normal return
MainThread: <Thread(Thread-1, stopped 140524052915968)>.join(): thread stopped
MainThread: <Thread(Thread-3, started 140524036130560)>.join(): waiting until thread stops
b
Thread-2: <Thread(Thread-2, started 140524044523264)>.__bootstrap(): normal return
c
Thread-3: <Thread(Thread-3, started 140524036130560)>.__bootstrap(): normal return
MainThread: <Thread(Thread-3, stopped 140524036130560)>.join(): thread stopped
Traceback (most recent call last):
File "test_thread_print.py", line 27, in <module>
assert p.returncode, "empty line encountered"
AssertionError: empty line encountered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment