mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-13 05:49:21 -04:00
Allow threads to gracefully shutdown
This commit is contained in:
@@ -309,7 +309,15 @@ void* JKRTask::run() {
|
||||
};
|
||||
OSInitFastCast();
|
||||
while (true) {
|
||||
#ifdef TARGET_PC
|
||||
BOOL received = FALSE;
|
||||
TaskMessage* msg = (TaskMessage*)waitMessageBlock(&received);
|
||||
if (!received) {
|
||||
break;
|
||||
}
|
||||
#else
|
||||
TaskMessage* msg = (TaskMessage*)waitMessageBlock();
|
||||
#endif
|
||||
if (msg->field_0x0) {
|
||||
msg->field_0x0(msg->field_0x4);
|
||||
check();
|
||||
|
||||
Reference in New Issue
Block a user