threading.get_ident()
works, or threading.current_thread().ident
(or threading.currentThread().ident
for Python < 2.6).
More Related Contents:
- How can I use threading in Python?
- Timeout on a function call
- threading.Timer – repeat function every ‘n’ seconds
- Are lists thread-safe?
- Freezing/Hanging tkinter GUI in waiting for the thread to complete
- Daemon Threads Explanation
- What is the use of join() in Python threading?
- thread starts running before calling Thread.start
- How to terminate a thread when main program ends?
- A very simple multithreading parallel URL fetching (without queue)
- The right way to limit maximum number of threads running at once?
- Thread vs. Threading
- Python – appending to same file from multiple threads
- How to pause and resume a thread using the threading module?
- Meaning of daemon property on Python Threads
- How to use threading in Python?
- What is the use of join() in threading?
- Return value from thread
- How to start threads at the same time in Python [duplicate]
- Restarting a thread in Python
- How do I use threading in Python?
- With “args” vs without “args” to pass arguments to a thread in Python
- Python: Something like `map` that works on threads [closed]
- How to get a faster speed when using multi-threading in python
- How to run multiple functions at the same time?
- Queue.Queue vs. collections.deque
- Threads vs. Async
- How to implement a Lock with a timeout in Python 2.7
- Python: Why is threaded function slower than non thread
- Why doesn’t a string in parentheses make a tuple with just that string? [duplicate]