Ejemplo n.º 1
0
 public EventWaiter(Type eventClass, AshFrameHandler frameHandler)
 {
     _eventClass   = eventClass;
     _frameHandler = frameHandler;
     //Without RunContinuationsAsynchronously, calling SetResult can block the calling thread, because the continuation is run synchronously
     //see https://stackoverflow.com/a/37492081
     _tcs = new TaskCompletionSource <bool>(TaskCreationOptions.RunContinuationsAsynchronously);
 }
Ejemplo n.º 2
0
 public TransactionWaiter(IEzspTransaction ezspTransaction, AshFrameHandler frameHandler)
 {
     _ezspTransaction = ezspTransaction;
     _frameHandler    = frameHandler;
     //Without RunContinuationsAsynchronously, calling SetResult can block the calling thread, because the continuation is run synchronously
     //see https://stackoverflow.com/a/37492081
     _tcs = new TaskCompletionSource <bool>(TaskCreationOptions.RunContinuationsAsynchronously);
 }