提交 3dbce4eb 编写于 作者: B Ben Blum

minor fix to rwlock.read()

上级 9470e5d7
......@@ -315,6 +315,7 @@ fn clone() -> rwlock {
* tasks may run concurrently with this one.
*/
fn read<U>(blk: fn() -> U) -> U {
let mut release = none;
unsafe {
do task::unkillable {
do (&self.order_lock).access {
......@@ -328,9 +329,9 @@ fn read<U>(blk: fn() -> U) -> U {
(&self.access_lock).acquire();
}
}
release = some(rwlock_release_read(self));
}
}
let _z = rwlock_release_read(self);
blk()
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册