Skip to content

Support cancellation #824

@crazytonyli

Description

@crazytonyli

From the uniffi-rs doc:

We don't directly support cancellation in UniFFI even when the underlying platforms do. You should build your cancellation in a separate, library specific channel;

Our use case is more complicated: the native code calls the Rust library's async functions, which are not cancellable, and the Rust async functions call the native RequestExecutor to make HTTP requests ("foreign future"), which are also not cancellable.

As a library whose main purpose is sending HTTP requests to WordPress sites, we should support cancellation: if the user cancels posting a comment, the underlying HTTP request should be cancelled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions