Skip to content

Commit

Permalink
Only set EXITED when current state is RUNNING.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Jun 24, 2020
1 parent 3850705 commit faaf5fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstd/sys/unix/freertos/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl Thread {
main();
thread_local::cleanup();

let previous_state = state.swap(EXITED, SeqCst);
let previous_state = state.compare_and_swap(RUNNING, EXITED, SeqCst);

join_mutex.unlock();

Expand Down

0 comments on commit faaf5fb

Please sign in to comment.