コード例 #1
0
 public static UniTask WhenAll(IEnumerable <UniTask> tasks)
 {
     using (var span = ArrayPoolUtil.Materialize(tasks)) {
         var promise = new WhenAllPromise(span.Array, span.Length); // consumed array in constructor.
         return(new UniTask(promise, 0));
     }
 }
コード例 #2
0
		public static async UniTask WhenAll(IEnumerable<UniTask> tasks) {
			WhenAllPromise promise;

			using (var span = ArrayPoolUtil.Materialize(tasks)) {
				promise = new WhenAllPromise(span.Array, span.Length);
			}

			await promise;
		}
コード例 #3
0
		public static async UniTask<T[]> WhenAll<T>(IEnumerable<UniTask<T>> tasks) {
			WhenAllPromise<T> promise;

			using (var span = ArrayPoolUtil.Materialize(tasks)) {
				promise = new WhenAllPromise<T>(span.Array, span.Length);
			}

			return await promise;
		}