File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9
- refs/heads/dist-snap: 9a6ebbbeccd926dc9eed1cfc34534bebb590ec75
9
+ refs/heads/dist-snap: 8c2ebe1622681c2a93a2fcf2673a5671fd110ead
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
12
12
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
Original file line number Diff line number Diff line change @@ -597,7 +597,6 @@ mod tests {
597
597
598
598
use arc:: * ;
599
599
600
- use std:: cell:: Cell ;
601
600
use std:: comm;
602
601
use std:: task;
603
602
@@ -628,7 +627,6 @@ mod tests {
628
627
let arc = ~MutexArc :: new ( false ) ;
629
628
let arc2 = ~arc. clone ( ) ;
630
629
let ( p, c) = comm:: oneshot ( ) ;
631
- let c = Cell :: new ( c) ;
632
630
do task:: spawn {
633
631
// wait until parent gets in
634
632
p. recv ( ) ;
@@ -638,8 +636,9 @@ mod tests {
638
636
} )
639
637
}
640
638
639
+ let mut c = Some ( c) ;
641
640
arc. access_cond ( |state, cond| {
642
- c. take ( ) . send ( ( ) ) ;
641
+ c. take_unwrap ( ) . send ( ( ) ) ;
643
642
assert ! ( !* state) ;
644
643
while !* state {
645
644
cond. wait ( ) ;
Original file line number Diff line number Diff line change @@ -676,7 +676,6 @@ mod tests {
676
676
use sync:: * ;
677
677
678
678
use std:: cast;
679
- use std:: cell:: Cell ;
680
679
use std:: comm;
681
680
use std:: result;
682
681
use std:: task;
@@ -762,9 +761,9 @@ mod tests {
762
761
let s = Semaphore :: new ( 1 ) ;
763
762
let s2 = s. clone ( ) ;
764
763
let ( p, c) = comm:: stream ( ) ;
765
- let child_data = Cell :: new ( ( s2, c) ) ;
764
+ let mut child_data = Some ( ( s2, c) ) ;
766
765
s. access ( || {
767
- let ( s2, c) = child_data. take ( ) ;
766
+ let ( s2, c) = child_data. take_unwrap ( ) ;
768
767
do task:: spawn {
769
768
c. send ( ( ) ) ;
770
769
s2. access ( || { } ) ;
@@ -947,13 +946,13 @@ mod tests {
947
946
let mut sibling_convos = ~[ ] ;
948
947
2 . times ( || {
949
948
let ( p, c) = comm:: stream ( ) ;
950
- let c = Cell :: new ( c) ;
951
949
sibling_convos. push ( p) ;
952
950
let mi = m2. clone ( ) ;
953
951
// spawn sibling task
954
952
do task:: spawn { // linked
953
+ let mut c = Some ( c) ;
955
954
mi. lock_cond ( |cond| {
956
- let c = c. take ( ) ;
955
+ let c = c. take_unwrap ( ) ;
957
956
c. send ( ( ) ) ; // tell sibling to go ahead
958
957
( || {
959
958
cond. wait ( ) ; // block forever
You can’t perform that action at this time.
0 commit comments