Why don't threads, mutexes, and semaphores work?

Threads are not implemented because of limitations in Mac OS 9. While Mac OS 9 has preemptive threads and synchronization primitives as part of the MPLibrary and DriverServicesLib, the usefulness of any implementation is very limited due to the fact that the majority of the Mac OS APIs are not thread-safe. Hence, most of the SDL APIs would not be thread-safe as they are built upon unsafe APIs.

Often programmers are misled into using threads, when a single-threaded solution is faster, simpler, and more robust. If you are unsure if you really need them, ask on the SDL mailing list and someone will provide assistance.

FAQ_MacOS_Classic_Multi-Threading (last edited 2008-04-17 08:18:28 by localhost)