The Python Oracle

How to obtain a Thread id in Python?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game Looping

--

Chapters
00:00 Question
00:39 Accepted answer (Score 341)
00:59 Answer 2 (Score 88)
01:33 Answer 3 (Score 31)
01:56 Answer 4 (Score 29)
02:23 Thank you

--

Full question
https://stackoverflow.com/questions/9198...

Accepted answer links:
[threading.get_ident()]: https://docs.python.org/3/library/thread...
[threading.current_thread().ident]: https://docs.python.org/3/library/thread...

Answer 2 links:
[logging]: http://docs.python.org/library/logging.h...
[LogRecord]: http://docs.python.org/library/logging.h...

Answer 3 links:
https://github.com/python/cpython/commit...
https://github.com/python/cpython/pull/1...

Answer 4 links:
[this method]: http://blog.devork.be/2010/09/finding-li...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #multithreading #pythonmultithreading #pythonlogging

#avk47