threading.get_ident()

https://docs.python.org/3/library/threading.html
Return the ‘thread identifier’ of the current thread. This is a nonzero integer. Its value has no direct meaning; it is intended as a magic cookie to be used e.g. to index a dictionary of thread-specific data. Thread identifiers may be recycled when a thread exits and another thread is created.
New in version 3.3.

posted @ 2017-06-05 22:03  papering  阅读(607)  评论(0)    收藏  举报