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
{{ message }}
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
I'm using glog on macOS and noticed that gettid(2) is used to obtain a "thread ID". However, on macOS this function is quite different from Linux and the output is not very useful for logging as it represents the uid and gid of a thread (see the explanation at http://elliotth.blogspot.co.uk/2012/04/gettid-on-mac-os.html, for example). As a result, multiple runs of the same program will usually end up with the same "thread ID" which makes analyzing logs quite painful. The linked blog post also mentions that it's possible to use pthread_threadid_np(3) starting from 10.5. Did you ever consider using this?