]> git.lizzy.rs Git - rust.git/commit
native: Fix a race in select()
authorAlex Crichton <alex@alexcrichton.com>
Mon, 14 Apr 2014 14:06:14 +0000 (07:06 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 16 Apr 2014 02:45:00 +0000 (19:45 -0700)
commit93dc55518840ee3cbd570c0d85aa7a445752af8b
treeb0e338768e2b094d97d0ca533e94e1f723d59ae3
parent4ca7abb1c4c76b4a23024baacdb7a023692c1d2d
native: Fix a race in select()

During selection, libnative would erroneously re-acquire ownership of a task
when a separate thread still had ownership of the task. The loop in select()
was rewritten to acknowledge this race and instead block waiting to re-acquire
ownership rather than plowing through.

Closes #13494
src/libnative/task.rs
src/test/run-pass/issue-13494.rs [new file with mode: 0644]