Пример #1
0
 /// <summary>AutoStart observable as coroutine.</summary>
 public static Coroutine StartAsCoroutine <T>(this IObservable <T> source, Action <T> onResult, Action <Exception> onError, CancellationToken cancel = default(CancellationToken))
 {
     return(MainThreadDispatcher.StartAsCoroutine(source.ToAwaitableEnumerator(onResult, onError, cancel)));
 }
Пример #2
0
        public static Coroutine WhenAll(IEnumerable <LazyTask> tasks)
        {
            var coroutines = tasks.Select(x => x.Start()).ToArray();

            return(MainThreadDispatcher.StartAsCoroutine(WhenAllCore(coroutines)));
        }