Skip to content

Commit b27c53b

Browse files
committed
Fix a deadlock in a libgreen test
Turns out when you grab an OS mutex, you need to be careful about when and where things are scheduled!
1 parent c0d4abf commit b27c53b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libgreen/sched.rs

Lines changed: 1 addition & 1 deletion
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)