Skip to content

Commit b5b570b

Browse files
committed
auto merge of #11204 : alexcrichton/rust/issue-11200, r=cmr
Turns out when you grab an OS mutex, you need to be careful about when and where things are scheduled! I've confirmed that I could fairly reliably get a deadlock (1 in 100 times ish) before this, and I cannot get a deadlock after this (after 1000+ runs). Closes #11200
2 parents aa5d779 + b27c53b commit b5b570b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libgreen/sched.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1433,7 +1433,7 @@ mod test {
14331433
drop(handle);
14341434

14351435
let mut handle = pool.spawn_sched();
1436-
handle.send(TaskFromFriend(pool.task(TaskOpts::new(), proc() {
1436+
handle.send(PinnedTask(pool.task(TaskOpts::new(), proc() {
14371437
// Wait until the other task has its lock
14381438
start_po.recv();
14391439

0 commit comments

Comments
 (0)