Beispiel #1
0
 public Task startTask <T>(System.Func <T> func)
 {
     log.Debug("start task" + func.GetType().ToString());
     return(Task.Factory.StartNew(func).ContinueWith(
                (task) => { callBack(task); }
                ));
 }
Beispiel #2
0
 public Task doWork(System.Func <bool> func)
 {
     //log.Debug("start task" + func.GetType().ToString() );
     Console.WriteLine("start task" + func.GetType().ToString());
     return(Task.Factory.StartNew(func).ContinueWith(
                (task) => { workCompleted(task); }
                ));
 }