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 2
2
refs/heads/master: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5
- refs/heads/try: 9a6ebbbeccd926dc9eed1cfc34534bebb590ec75
5
+ refs/heads/try: 8c2ebe1622681c2a93a2fcf2673a5671fd110ead
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
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