示例#1
0
 void ObservePromise(Promise <T> promise)
 {
     promise.Done(deferred.Resolve);
     promise.Fail(t => {
         nonResolvedCount++;
         if (nonResolvedCount == size)
         {
             deferred.Dispose();
         }
     });
     promise.Disposed(() => {
         nonResolvedCount++;
         if (nonResolvedCount == size)
         {
             deferred.Dispose();
         }
     });
 }