Bonita Montero
Bonita Montero

Reputation: 3101

Is there a reserved thread-id value?

When I call GetCurrentThreadId, is there a reserved value that will never be used for a thread-id, maybe zero ? I want to get the thread-id directly from the TIB and I need a reserved value. Otherwise I'd use a additional bool.

Upvotes: 0

Views: 134

Answers (1)

Guest
Guest

Reputation: 41

Thread ID of a valid thread is always non-zero. See Thread Handles and Identifiers which states:

Note that no thread identifier will ever be 0.

Upvotes: 4

Related Questions