We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
EXITED
state
RUNNING
1 parent 3850705 commit faaf5fbCopy full SHA for faaf5fb
src/libstd/sys/unix/freertos/thread.rs
@@ -82,7 +82,7 @@ impl Thread {
82
main();
83
thread_local::cleanup();
84
85
- let previous_state = state.swap(EXITED, SeqCst);
+ let previous_state = state.compare_and_swap(RUNNING, EXITED, SeqCst);
86
87
join_mutex.unlock();
88
0 commit comments