diff options
| author | Andreas T Jonsson <mail@andreasjonsson.se> | 2024-05-10 09:04:52 +0200 |
|---|---|---|
| committer | Andreas T Jonsson <mail@andreasjonsson.se> | 2024-05-10 09:04:52 +0200 |
| commit | b72c2edabbc9087b07a30b781de1925d6570dd62 (patch) | |
| tree | 0e96f43038901ec8c6f6b015071c1803a2166d41 /core/thread | |
| parent | 273e4c6b4ce6f1060870782c8e780fe2b371ede4 (diff) | |
| parent | 41bd8cf7143902db59c02c56fc5318a7e749d7a5 (diff) | |
Merge branch 'master' into netbsd
Diffstat (limited to 'core/thread')
| -rw-r--r-- | core/thread/thread_unix.odin | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/thread/thread_unix.odin b/core/thread/thread_unix.odin index e25d3541c..36ee035a5 100644 --- a/core/thread/thread_unix.odin +++ b/core/thread/thread_unix.odin @@ -25,7 +25,7 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread { when ODIN_OS != .Darwin { // We need to give the thread a moment to start up before we enable cancellation. - can_set_thread_cancel_state := unix.pthread_setcancelstate(unix.PTHREAD_CANCEL_DISABLE, nil) == 0 + can_set_thread_cancel_state := unix.pthread_setcancelstate(unix.PTHREAD_CANCEL_ENABLE, nil) == 0 } sync.lock(&t.mutex) @@ -40,7 +40,7 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread { // Enable thread's cancelability. if can_set_thread_cancel_state { unix.pthread_setcanceltype (unix.PTHREAD_CANCEL_ASYNCHRONOUS, nil) - unix.pthread_setcancelstate(unix.PTHREAD_CANCEL_DISABLE, nil) + unix.pthread_setcancelstate(unix.PTHREAD_CANCEL_ENABLE, nil) } } |