Enum std::rt::task::BlockedTask[src]
pub enum BlockedTask {
Owned(Box<Task>),
Shared(Arc<AtomicUint>),
}A handle to a blocked task. Usually this means having the Box
Variants
Owned | |
Shared |
Methods
impl BlockedTask
fn wake(self) -> Option<Box<Task>>
Returns Some if the task was successfully woken; None if already killed.
fn reawaken(self)
Reawakens this task if ownership is acquired. If finer-grained control
is desired, use wake instead.
fn trash(self)
fn block(task: Box<Task>) -> BlockedTask
Create a blocked task, unless the task was already killed.
fn make_selectable(self, num_handles: uint) -> Take<BlockedTasks>
Converts one blocked task handle to a list of many handles to the same.
unsafe fn cast_to_uint(self) -> uint
Convert to an unsafe uint value. Useful for storing in a pipe's state flag.
unsafe fn cast_from_uint(blocked_task_ptr: uint) -> BlockedTask
Convert from an unsafe uint value. Useful for retrieving a pipe's state flag.