The rust style wrapping of various SF com apis ignores this cancellation, and informs SF that the operation is not cancellable.
Various Abort signals may also relate to cancellation.
Where CancellationToken cancellationToken can trigger SF c++ to cancel the operation. In SF -> csharp code as well, CancellationToken is passed to tell csharp code to cancel.
For Rust, a similar api can be modeled follwoing csharp:
Current Rust -> SF api:
In SF com api, cancellation is handled by IFabricAsyncOperationContext: https://github.com/Azure/service-fabric-rs/blob/acb9afc3fbf211803874480714e3a3f9f001efda/crates/libs/com/src/ServiceFabric/FabricCommon.rs#L216
The rust style wrapping of various SF com apis ignores this cancellation, and informs SF that the operation is not cancellable. Various Abort signals may also relate to cancellation.
In csharp api looks like this:
Where
CancellationToken cancellationToken
can trigger SF c++ to cancel the operation. In SF -> csharp code as well, CancellationToken is passed to tell csharp code to cancel.For Rust, a similar api can be modeled follwoing csharp: Current Rust -> SF api:
Proposed client api: Rust code can call token cancel to cancel SF operation.
Current sf->rust api
Proposed sf -> rust api
When writing rust app, one can check if sf cancels the operation from cancelation_token.