Added support for reading the thread ID of the synchronizing thread.