private Promise<T> _Catch(ChainReturnDelegate Chain) { lock(lockObject) { return new Promise<T>((LocalResolve, LocalReject) => { try { _asyncSubject .First() .Where(_ => _isRejected) .Subscribe(_ => { _payload = Chain(_payload); LocalResolve(_payload); }); _asyncSubject .First() .Where(_ => _isFulfilled) .Subscribe(_ => { LocalResolve(_payload); }); } catch { LocalReject(_payload); } }); } }
static IEnumerable <int> Bug_1333_Enumerable(AsyncSubject <IDisposable> s, Semaphore sema) { var d = s.First(); var t = new Thread(() => { d.Dispose(); sema.Release(); }); t.Start(); t.Join(); yield return(1); }
static IEnumerable<int> Bug_1333_Enumerable(AsyncSubject<IDisposable> s, Semaphore sema) { var d = s.First(); var t = new Thread(() => { d.Dispose(); sema.Release(); }); t.Start(); t.Join(); yield return 1; }