How to determine the name/number of the current thread

chris007

Новичок
Регистрация
09.10.2012
Сообщения
14
Благодарностей
1
Баллы
0
I'm writing a template that works with a server script and needs to communicate the identity of the current thread so it can assign the appropriate action.

If I'm running a template on multiple threads, how can I determine the identity of the current thread?
 

chris007

Новичок
Регистрация
09.10.2012
Сообщения
14
Благодарностей
1
Баллы
0
So, can anyone tell me how to determine the identity of the current thread?
Is there a variable where this information is stored?

I want to know if the current thread is thread #1 or thread #2 or some other number.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 714
Баллы
113
Why don't you use global variables for this? To make global counter.

Initiate global variable and at the beginning of your template add +1 to it. So every new thread will have its own number.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)