-/* The gl_thread_t is the thread id, not the thread handle. If it were the
- thread handle, it would be hard to implement gl_thread_self()
- (since GetCurrentThread () returns a pseudo-handle,
- DuplicateHandle (GetCurrentThread ()) returns a handle that must be closed
- afterwards, and there is no function for quickly retrieving a thread handle
- from its id). */
-typedef DWORD gl_thread_t;
+/* The gl_thread_t is a pointer to a structure in memory.
+ Why not the thread handle? If it were the thread handle, it would be hard
+ to implement gl_thread_self() (since GetCurrentThread () returns a pseudo-
+ handle, DuplicateHandle (GetCurrentThread ()) returns a handle that must be
+ closed afterwards, and there is no function for quickly retrieving a thread
+ handle from its id).
+ Why not the thread id? I tried it. It did not work: Sometimes ids appeared
+ that did not belong to running threads, and glthread_join failed with ESRCH.
+ */
+typedef struct gl_thread_struct *gl_thread_t;