예제 #1
0
        /// <summary>
        ///     Timeout with suppress OperationCanceledException. Returns (bool, IsCacneled).
        /// </summary>
        public static async UniTask <bool> TimeoutWithoutException(this UniTask task, TimeSpan timeout, bool ignoreTimeScale = true,
                                                                   PlayerLoopTiming timeoutCheckTiming = PlayerLoopTiming.Update, CancellationTokenSource taskCancellationTokenSource = null)
        {
            var v = await TimeoutWithoutException(task.AsAsyncUnitUniTask(), timeout, ignoreTimeScale, timeoutCheckTiming, taskCancellationTokenSource);

            return(v.IsTimeout);
        }
예제 #2
0
 public static UniTask Timeout(this UniTask task, TimeSpan timeout, bool ignoreTimeScale = true, PlayerLoopTiming timeoutCheckTiming = PlayerLoopTiming.Update,
                               CancellationTokenSource taskCancellationTokenSource       = null)
 {
     return(Timeout((UniTask)task.AsAsyncUnitUniTask(), timeout, ignoreTimeScale, timeoutCheckTiming, taskCancellationTokenSource));
 }
예제 #3
0
        public static async UniTask <bool> TimeoutWithoutException(this UniTask task, TimeSpan timeout, CancellationTokenSource taskCancellationTokenSource = null)
        {
            var v = await TimeoutWithoutException(task.AsAsyncUnitUniTask(), timeout, taskCancellationTokenSource);

            return(v.isTimeout);
        }
예제 #4
0
 public static UniTask Timeout(this UniTask task, TimeSpan timeout, CancellationTokenSource taskCancellationTokenSource = null)
 {
     return(Timeout(task.AsAsyncUnitUniTask(), timeout, taskCancellationTokenSource));
 }
예제 #5
0
 public static UniTask WithCancellation(this UniTask task, CancellationToken cancellationToken, CancellationTokenSource taskCancellationTokenSource = null)
 {
     return(WithCancellation(task.AsAsyncUnitUniTask(), cancellationToken, taskCancellationTokenSource));
 }