Skip to content

Instantly share code, notes, and snippets.

@jimbaker
Created January 21, 2015 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimbaker/4ec81726b086c7e1b983 to your computer and use it in GitHub Desktop.
Save jimbaker/4ec81726b086c7e1b983 to your computer and use it in GitHub Desktop.
Print main thread name before theading.py clobbers it
diff -r 9c81bac53d7a Lib/threading.py
--- a/Lib/threading.py Tue Jan 20 22:06:52 2015 +0000
+++ b/Lib/threading.py Wed Jan 21 14:29:01 2015 -0700
@@ -274,6 +274,7 @@
class _MainThread(Thread):
def __init__(self):
+ print "main thread=%r" % (java.lang.Thread.currentThread().name,)
Thread.__init__(self, name="MainThread")
import atexit
atexit.register(self.__exitfunc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment