コード例 #1
0
        /// <summary>
        /// Add a task that will return a value.
        /// </summary>
        /// <typeparam name="T">The type of the return value.</typeparam>
        /// <param name="callback">The task to execute.</param>
        /// <returns>The return value of the task embedded in a Result object.</returns>
        public Result <T> Call <T>(Func <T> callback)
        {
            Task task = Task.Create(callback);

            reactor.Add(task, false);

            return((Result <T>)task.result);
        }