Partial reply to myself... I used Start instead of Run, and the thread was detached from variable.
But now, I'm using Thread::GetCurrentId() which should return the Id of calling thread, but returns instead a very big number which has probably nothing to do with it.
OS? Anyway the implementation is really straightforward, so I do not think there should be a bug there...
Quote:
How can I check if I'm inside a required thread ? (same as IsMainThread, but something like myThread.Inside())
What about storing the thread id into thread_local variable at the start of the thread and then test if your GetCurrentId is the same?