Esempio n. 1
0
 private static void DoWork <T>(T data, Action <T> work, EmptyFuture future)
 {
     try {
         work(data);
         future.Set();
     } catch (Exception e) {
         future.Failed(e);
     }
 }
Esempio n. 2
0
 private static void DoWork(Action work, EmptyFuture future)
 {
     try {
         work();
         future.Set();
     } catch (Exception e) {
         future.Failed(e);
     }
 }