minor fix to rwlock.read()
This commit is contained in:
parent
9470e5d7d5
commit
3dbce4ebea
1 changed files with 2 additions and 1 deletions
|
|
@ -315,6 +315,7 @@ impl &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 @@ impl &rwlock {
|
|||
(&self.access_lock).acquire();
|
||||
}
|
||||
}
|
||||
release = some(rwlock_release_read(self));
|
||||
}
|
||||
}
|
||||
let _z = rwlock_release_read(self);
|
||||
blk()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue