anchor.diff:      let addWork prio (f: unit -> System.Threading.Tasks.Task<'a>) ({ DynamicQueue = queue } as q) =
           let tcs = new TaskCompletionSource<_>()
           let work =
  -            { StartWork = (fun () -> 
  -                f().ContinueWith(fun (t:System.Threading.Tasks.Task<'a>) -> 
  +            { StartWork = (fun () ->
  +                let t =
  +                    try
  +                        f()
  +                    with e -> 
  +                        //Task.FromException (e)
  +                        let tcs = new TaskCompletionSource<_>()
  +                        tcs.SetException e
  +                        tcs.Task
  +                
  +                t.ContinueWith(fun (t:System.Threading.Tasks.Task<'a>) -> 
                       if t.IsCanceled then
                           tcs.SetException(new TaskCanceledException(t))
                       elif t.IsFaulted then
  
positive.code:     let workers =
          // start maximal 7 requests at the same time.
          [ 0 .. 7 ]
          |> Seq.map (fun _ -> ResolverRequestQueue.startProcessing cts.Token workerQueue)
  
      let getAndReport blockReason (workHandle:WorkHandle<_>) =
          if workHandle.Task.IsCompleted then
  
negative.code:         else
              workHandle.Reprioritize WorkPriority.BlockingWork
              use d = Profile.startCategory (Profile.Category.ResolverAlgorithmBlocked blockReason)
              let isFinished = workHandle.Task.Wait(60000)
              if not isFinished then
                  raise <| new TimeoutException("Waited 60 seconds for a request to finish, maybe a bug in the paket request scheduler.")
              let result = workHandle.Task.Result
              d.Dispose()
              result
  