Skip to content

(PR ready) Feature request: Cancellation token handling and Rust support #282

Description

@Xerxes004

Currently, C# cancellation tokens just directly call the tokio task abort function when cancelled. Using the tokio-util crate, this can be made more robust using Cancellation Tokens. These offer a nice way to recover gracefully on the Rust side of the FFI interface, rather than the task being dropped at the next await synchronization point.

I've created a pull request that does a few things:

  1. Adds basic cancellation token support via tokio_util::sync::CancellationToken. This is guarded behind the tokio-ct feature flag.
  2. Adds a basic asynchronous programming example to the production example project

(PR draft #281)

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreInteroptopus Core CrateenhancementMake existing things better.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions