Esempio n. 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);
        }
Esempio n. 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));
 }
Esempio n. 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);
        }
Esempio n. 4
0
 public static UniTask Timeout(this UniTask task, TimeSpan timeout, CancellationTokenSource taskCancellationTokenSource = null)
 {
     return(Timeout(task.AsAsyncUnitUniTask(), timeout, taskCancellationTokenSource));
 }
Esempio n. 5
0
 public static UniTask WithCancellation(this UniTask task, CancellationToken cancellationToken, CancellationTokenSource taskCancellationTokenSource = null)
 {
     return(WithCancellation(task.AsAsyncUnitUniTask(), cancellationToken, taskCancellationTokenSource));
 }