anchor.diff:      // Contains helpers that will attach continuation to the given task.
       // Should be invoked as a part of protectedPrimitive(withResync) call
       module TaskHelpers = 
  -        let continueWith (task : Task<'T>, args) = 
  +        let continueWith (task : Task<'T>, args, useCcontForTaskCancellation) = 
   
               let continuation (completedTask : Task<_>) : unit =
                   args.aux.trampolineHolder.Protect((fun () ->
                       if completedTask.IsCanceled then
  -                        args.aux.econt (ExceptionDispatchInfo.Capture(new OperationCanceledException()))
  +                        if useCcontForTaskCancellation then args.aux.ccont(new OperationCanceledException())
  +                        else args.aux.econt (ExceptionDispatchInfo.Capture(new OperationCanceledException()))
                       elif completedTask.IsFaulted then
                           args.aux.econt (MayLoseStackTrace(completedTask.Exception))
                       else
  
positive.code: #if FX_NO_BEGINEND_READWRITE
                  // use combo protectedPrimitiveWithResync + continueWith instead of AwaitTask so we can pass cancellation token to the WriteAsync task
                  protectedPrimitiveWithResync ( fun ({ aux = aux} as args) ->
                      TaskHelpers.continueWithUnit(stream.WriteAsync(buffer, offset, count, aux.token), args)
                      )
  #else
                  Async.FromBeginEnd (buffer,offset,count,stream.BeginWrite,stream.EndWrite)
  
negative.code: #if FX_NO_BEGINEND_READWRITE
                  // use combo protectedPrimitiveWithResync + continueWith instead of AwaitTask so we can pass cancellation token to the ReadAsync task
                  protectedPrimitiveWithResync (fun ({ aux = aux } as args) ->
                      TaskHelpers.continueWith(stream.ReadAsync(buffer, offset, count, aux.token), args, false)
                      )
  #else
                  Async.FromBeginEnd (buffer,offset,count,stream.BeginRead,stream.EndRead)
  