ID - how much could be?
Peter Otten
__peter__ at web.de
Sat Sep 13 03:48:05 EDT 2014
More information about the Python-list mailing list
Sat Sep 13 03:48:05 EDT 2014
- Previous message (by thread): Thread-ID - how much could be?
- Next message (by thread): Thread-ID - how much could be?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
dieter wrote: > Ervin Hegedüs <airween at gmail.com> writes: >> ... > What is used as thread id is platform dependent. Likely, it depends > on the thread support of the underlying C libary (i.e. the > operating system thread support). > > Under Linux, thread ids seem to be addresses - i.e. very large > integers. $ grep "Exception in thread" /usr/lib/python3.4/threading.py _sys.stderr.write("Exception in thread %s:\n%s\n" % "Exception in thread " + self.name + I believe the "Thread-ID"s we are talking about are actually user-specified names attached Python's threading.Thread instances, not something on the OS level. These names default to $ grep -i -A4 -B1 "def _newname" /usr/lib/python3.4/threading.py _counter = 0 def _newname(template="Thread-%d"): global _counter _counter += 1 return template % _counter
- Previous message (by thread): Thread-ID - how much could be?
- Next message (by thread): Thread-ID - how much could be?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list