File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: be664ddd2917e13c1c5f05a49476f8b67be85140
2
+ refs/heads/master: 2a128fa205f36074c8fbf4bc490e1ad0f76f38f6
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5
5
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
Original file line number Diff line number Diff line change @@ -102,11 +102,14 @@ impl methods<T> for exclusive<T> {
102
102
fn with < U > ( f : fn ( sys:: condition , x : & T ) -> U ) -> U {
103
103
unsafe {
104
104
let ptr: ~arc_data < ex_data < T > > = unsafe :: reinterpret_cast ( * self ) ;
105
- let rec: & ex_data < T > = & ( * ptr) . data ;
105
+ let r = {
106
+ let rec: & ex_data < T > = & ( * ptr) . data ;
107
+ rec. lock . lock_cond ( ) { |c|
108
+ f ( c, & rec. data )
109
+ }
110
+ } ;
106
111
unsafe :: forget ( ptr) ;
107
- rec. lock . lock_cond ( ) { |c|
108
- f ( c, & rec. data )
109
- }
112
+ r
110
113
}
111
114
}
112
115
}
You can’t perform that action at this time.
0 commit comments