0

I have a program and I start 3 threads separately. I am using version 2.4.3.

thread.get_ident() is not available in this version of Python I guess. I use threading.currentThread() but it only returns me this:

<_MainThread(MainThread, started)>

In other versions (3.3.3) I get something like

<_MainThread(MainThread, started 5420)>

where 5420 represents the Thread ID. How can I get this ID in Python 2.4 Versions?

Biswarup Dass
  • 193
  • 1
  • 5
  • 19

1 Answers1

0

According to the 2.4.3 thread docs, get_ident is a method on thread:

get_ident()

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.

Kellen
  • 581
  • 5
  • 18