win32api.GetCurrentThreadId

int = GetCurrentThreadId()

Returns the thread ID for the current thread.

Win32 API References

Search for GetCurrentThreadId at msdn, google or google groups.