Exemplo n.º 1
0
 async Task CalcGenomeRoutesAsync()
 {
     if (ProcessChunk == 1)
     {
         foreach (var item in Populations)
         {
             await item.CalcRoutesAsync(routeService);
         }
     }
     else
     {
         await Populations
         .ToObservable(ThreadPoolScheduler.Instance)
         .Select(n => Observable.FromAsync(_ => n.CalcRoutesAsync(routeService)))
         .Merge(ProcessChunk);
     }
 }