Cancellable: remove UsingToken usages in tests#18276
Conversation
✅ No release notes required |
|
So, just removing the member from the public API didn't work, as it was used in |
|
@auduchinok I'm not sure about removing inline there, would it affect stack traces and debugging? Somewhat related: It would be great to integrate the functionality of |
54bf644 to
f41696e
Compare
The token is now always set inside the cancellable computation
f41696e to
91ef654
Compare
|
So, I did some benchmark runs using FCSSourceFiles benchmark and frankly I see no difference between inlined and not inlined /// Run a cancellable computation using the given cancellation token
let inline run (ct: CancellationToken) (Cancellable oper) =
if ct.IsCancellationRequested then
ValueOrCancelled.Cancelled(OperationCanceledException ct)
else
oper ctit seems the idea was to just expand the cancel check inline. |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Removes
Cancellable.UsingTokenfrom the public surface, since the computation now always sets the token.