pub fn future_result(&mut self) -> Port<TaskResult> {
        // FIXME (#3725): Once linked failure and notification are
        // handled in the library, I can imagine implementing this by just
        // registering an arbitrary number of task::on_exit handlers and
        // sending out messages.

        if self.opts.notify_chan.is_some() {
            fail!("Can't set multiple future_results for one task!");
        }

        // Construct the future and give it to the caller.
        let (notify_pipe_po, notify_pipe_ch) = Chan::new();

        // Reconfigure self to use a notify channel.
        self.opts.notify_chan = Some(notify_pipe_ch);

        notify_pipe_po
    }
/// Get a future representing the exit status of the task.
///
/// Taking the value of the future will block until the child task
/// terminates. The future result return value will be created *before* the task is
/// spawned; as such, do not invoke .get() on it directly;
/// rather, store it in an outer variable/list for later use.
///
/// Note that the future returned by this function is only useful for
/// obtaining the value of the next task to be spawning with the
/// builder. If additional tasks are spawned with the same builder
/// then a new result future must be obtained prior to spawning each
/// task.
///
/// # Failure
/// Fails if a future_result was already set for this task.
Get a future representing the exit status of the task.
Taking the value of the future will block until the child task
terminates. The future result return value will be created *before* the task is
spawned; as such, do not invoke .get() on it directly;
rather, store it in an outer variable/list for later use.

Note that the future returned by this function is only useful for
obtaining the value of the next task to be spawning with the
builder. If additional tasks are spawned with the same builder
then a new result future must be obtained prior to spawning each
task.
Get a future representing the exit status of the task . Taking the value of the future will block until the child task terminates . The future result return value will be created * before * the task is spawned ; as such do not invoke . get () on it directly ; rather store it in an outer variable / list for later use . Note that the future returned by this function is only useful for obtaining the value of the next task to be spawning with the builder . If additional tasks are spawned with the same builder then a new result future must be obtained prior to spawning each task .
pub fn future_result(&mut self) -> Port<TaskResult> {
        // FIXME (#3725): Once linked failure and notification are
        // handled in the library, I can imagine implementing this by just
        // registering an arbitrary number of task::on_exit handlers and
        // sending out messages.
        if self.opts.notify_chan.is_some() {
            fail!("Can't set multiple future_results for one task!");
        }
        // Construct the future and give it to the caller.
        let (notify_pipe_po, notify_pipe_ch) = Chan::new();
        // Reconfigure self to use a notify channel.
        self.opts.notify_chan = Some(notify_pipe_ch);
        notify_pipe_po
    }
pub fn future_result ( & mut self ) -> Port < TaskResult > { // FIXME (#3725): Once linked failure and notification are // handled in the library, I can imagine implementing this by just // registering an arbitrary number of task::on_exit handlers and // sending out messages. if self . opts . notify_chan . is_some ( ) { fail ! ( " " ) ; } // Construct the future and give it to the caller. let ( notify_pipe_po , notify_pipe_ch ) = Chan :: new ( ) ; // Reconfigure self to use a notify channel. self . opts . notify_chan = Some ( notify_pipe_ch ) ; notify_pipe_po }
Get a future representing the exit status of the task.
Get a future representing the exit status of the task .
&mut self
&mut self
failure
Fails if a future_result was already set for this task.
Fails if a future_result was already set for this task .