You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Apple documentation warns that:
pthread_self() should be used, even on platforms where getpid() gives
different answers in each thread, since that may depend on the machine
the program is run on, not the machine where the program is being
compiled. For instance, Red Hat 8 Linux and earlier used LinuxThreads,
whose getpid() returns a different value for each thread. Red Hat 9
Linux and later use NPTL, which is Posix-conformant, and has a getpid()
that returns the same value for all threads in a process. A program
compiled on Red Hat 8 and run on Red Hat 9 will therefore see getpid()
returning the same value for all threads.
PL_thread_self seems like a reasonable choice as well, since it hides most of this stuff behind an API. I think for the winpthreads-2 you will need pthread_self()->tid, but for pthread-win32 you need just pthread_self() which is perhaps a bit ugly.
Which id provider to use? see 4fddba0
The text was updated successfully, but these errors were encountered: