UniRx 에셋 추가

This commit is contained in:
Mingu Kim
2025-06-02 00:27:36 +09:00
parent 915f292d7d
commit 8a54d47b56
510 changed files with 42973 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6))
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace UniRx.InternalUtil
{
internal static class PromiseHelper
{
internal static void TrySetResultAll<T>(IEnumerable<TaskCompletionSource<T>> source, T value)
{
var rentArray = source.ToArray(); // better to use Arraypool.
var array = rentArray;
var len = rentArray.Length;
for (int i = 0; i < len; i++)
{
array[i].TrySetResult(value);
array[i] = null;
}
}
}
}
#endif