1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00
Files
godot/drivers/unix/thread_posix.cpp
Pedro J. Estébanez d806ad4a3d Implement custom thread numbering for POSIX
For every UNIX-derived (Android, Linux, macOS, iOS) flavor, a global counter is atomically incremented on thread start. That id is kept as thread-local storage.

Therefore, thread ids are sequential numbers, trivially comparable. This improves the previous state of things, in which `pthread_t` were casted to `Thread::ID` and unportabily compared. Also big, ugly thread ids appeared.
2017-08-24 07:02:55 +02:00

4.8 KiB