[quote='816179021, GangOrca, /thread/816179, /profile/GangOrca'] Whereas, with conditional variables, there are no warnings. [/quote] I wouldn’t read too much into that. These warnings have to be explicitly coded, and we added that code for Dispatch semaphores because that’s the most common offender here. It wouldn’t surprise me if we added a similar warning for pthread condition variables at some point in the future. Then again, it wouldn’t surprise me if we didn’t. The pthreads API is relatively obscure. [quote='816179021, GangOrca, /thread/816179, /profile/GangOrca'] What is the recommend way? [/quote] There isn’t a supported way to block the main thread of a GUI application for long periods of time. On macOS it will SPOD, which is a terrible user experience. On other platforms the app will likely end up being killed by the watchdog. And to be clear, the issue here isn’t about the specific APIs you’re using, it’s this overall design. Speaking of iOS and friends, app termination [1] behaves very differently
Topic:
App & System Services
SubTopic:
Core OS
Tags: