示例#1
0
        public void UniTask()
        {
            UniTaskCompletionSource <object> deferred = new UniTaskCompletionSource <object>();
            var promise = deferred.Task;

            for (int i = 0; i < N; ++i)
            {
                int index = i;
                promise = promise
                          .ContinueWith(_ => UniTaskHelper.uniVoids[index].Task)
                          .ContinueWith(() => UniTaskHelper.uniVectors[index].Task)
                          .ContinueWith(_ => UniTaskHelper.uniObjects[index].Task);
            }

            promise.Forget();
            deferred.TrySetResult(Instances.obj);
            UniTaskHelper.ResolveCompletionSources();
        }
示例#2
0
 public void UniTask()
 {
     _ = AwaitUniTasks();
     UniTaskHelper.ResolveCompletionSources();
 }