@@ -159,7 +159,7 @@ use rt::task::Task;
159
159
use task:: spawn:: Taskgroup ;
160
160
use to_bytes:: IterBytes ;
161
161
use unstable:: atomics:: { AtomicUint , Relaxed } ;
162
- use unstable:: sync:: { UnsafeAtomicRcBox , LittleLock } ;
162
+ use unstable:: sync:: { UnsafeArc , LittleLock } ;
163
163
use util;
164
164
165
165
static KILLED_MSG : & ' static str = "killed by linked failure" ;
@@ -170,7 +170,7 @@ static KILL_KILLED: uint = 1;
170
170
static KILL_UNKILLABLE : uint = 2 ;
171
171
172
172
struct KillFlag ( AtomicUint ) ;
173
- type KillFlagHandle = UnsafeAtomicRcBox < KillFlag > ;
173
+ type KillFlagHandle = UnsafeArc < KillFlag > ;
174
174
175
175
/// A handle to a blocked task. Usually this means having the ~Task pointer by
176
176
/// ownership, but if the task is killable, a killer can steal it at any time.
@@ -211,7 +211,7 @@ struct KillHandleInner {
211
211
212
212
/// State shared between tasks used for task killing during linked failure.
213
213
#[ deriving( Clone ) ]
214
- pub struct KillHandle ( UnsafeAtomicRcBox < KillHandleInner > ) ;
214
+ pub struct KillHandle ( UnsafeArc < KillHandleInner > ) ;
215
215
216
216
/// Per-task state related to task death, killing, failure, etc.
217
217
pub struct Death {
@@ -317,7 +317,7 @@ impl BlockedTask {
317
317
let handles = match self {
318
318
Unkillable ( task) => {
319
319
let flag = unsafe { KillFlag ( AtomicUint :: new ( cast:: transmute ( task) ) ) } ;
320
- UnsafeAtomicRcBox :: newN ( flag, num_handles)
320
+ UnsafeArc :: newN ( flag, num_handles)
321
321
}
322
322
Killable ( flag_arc) => flag_arc. cloneN ( num_handles) ,
323
323
} ;
@@ -380,8 +380,8 @@ impl Eq for KillHandle {
380
380
impl KillHandle {
381
381
pub fn new ( ) -> ( KillHandle , KillFlagHandle ) {
382
382
let ( flag, flag_clone) =
383
- UnsafeAtomicRcBox :: new2 ( KillFlag ( AtomicUint :: new ( KILL_RUNNING ) ) ) ;
384
- let handle = KillHandle ( UnsafeAtomicRcBox :: new ( KillHandleInner {
383
+ UnsafeArc :: new2 ( KillFlag ( AtomicUint :: new ( KILL_RUNNING ) ) ) ;
384
+ let handle = KillHandle ( UnsafeArc :: new ( KillHandleInner {
385
385
// Linked failure fields
386
386
killed : flag,
387
387
unkillable : AtomicUint :: new ( KILL_RUNNING ) ,
@@ -460,7 +460,7 @@ impl KillHandle {
460
460
pub fn notify_immediate_failure ( & mut self ) {
461
461
// A benign data race may happen here if there are failing sibling
462
462
// tasks that were also spawned-watched. The refcount's write barriers
463
- // in UnsafeAtomicRcBox ensure that this write will be seen by the
463
+ // in UnsafeArc ensure that this write will be seen by the
464
464
// unwrapper/destructor, whichever task may unwrap it.
465
465
unsafe { ( * self . get ( ) ) . any_child_failed = true ; }
466
466
}
0 commit comments