diff options
author | Jonathan Chambers <joncham@gmail.com> | 2018-07-25 22:46:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-25 22:46:48 +0300 |
commit | f40bf2ab729fa043a20e400839aae1ffce03e2ca (patch) | |
tree | 19bf17d44f7d729056605e84a19f0619061a478e | |
parent | 0f9ef2d7cfc3cd790c62f8c982a72ad7647b5fa2 (diff) | |
parent | bc3902f261d9e9427c20fd7c5521286e0557e34d (diff) |
Merge pull request #13 from Unity-Technologies/unity-master-fix-darwin-suspend
Perform thread_suspend in loop as it may be interrupted.
-rw-r--r-- | darwin_stop_world.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/darwin_stop_world.c b/darwin_stop_world.c index cac7a8da..fa3e49ea 100644 --- a/darwin_stop_world.c +++ b/darwin_stop_world.c @@ -636,7 +636,9 @@ GC_INNER void GC_stop_world(void) if ((p->flags & FINISHED) == 0 && !p->thread_blocked && p->stop_info.mach_thread != my_thread) { - kern_result = thread_suspend(p->stop_info.mach_thread); + do { + kern_result = thread_suspend(p->stop_info.mach_thread); + } while (kern_result == KERN_ABORTED); if (kern_result != KERN_SUCCESS) ABORT("thread_suspend failed"); if (GC_on_thread_event) |