mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-08 18:42:27 -04:00
Allow threads to gracefully shutdown
This commit is contained in:
@@ -101,11 +101,22 @@ public:
|
||||
}
|
||||
return message;
|
||||
}
|
||||
#ifdef TARGET_PC
|
||||
OSMessage waitMessageBlock(BOOL* received) {
|
||||
OSMessage message;
|
||||
BOOL rv = OSReceiveMessage(&mMessageQueue, &message, OS_MESSAGE_BLOCK);
|
||||
if (received) {
|
||||
*received = rv;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
#else
|
||||
OSMessage waitMessageBlock() {
|
||||
OSMessage message;
|
||||
OSReceiveMessage(&mMessageQueue, &message, OS_MESSAGE_BLOCK);
|
||||
return message;
|
||||
}
|
||||
#endif
|
||||
void jamMessageBlock(OSMessage message) {
|
||||
OSJamMessage(&mMessageQueue, message, OS_MESSAGE_BLOCK);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user