Apache OpenDALâ„¢ C Binding
The C binding for Apache OpenDALâ„¢
Loading...
Searching...
No Matches
opendal_cancel_token Struct Reference

An opaque, thread-safe token used to cancel in-flight OpenDAL operations. More...

#include <opendal.h>

Public Attributes

void * inner

Detailed Description

An opaque, thread-safe token used to cancel in-flight OpenDAL operations.

Pass a token created with opendal_cancel_token_new() to any *_with_cancel function. Calling opendal_cancel_token_cancel() from another thread wakes waiting operations and causes them to drop their in-flight work and return OPENDAL_CANCELLED.

A single token may be shared across multiple concurrent operations, and cancelling it is idempotent. Free the token with opendal_cancel_token_free() only after all operations using it have returned.

See also
opendal_cancel_token_new()
opendal_cancel_token_cancel()
opendal_cancel_token_is_cancelled()
opendal_cancel_token_free()

Member Data Documentation

◆ inner

void* opendal_cancel_token::inner

The pointer to the internal Rust cancel token state. Only touch this on judging whether it is NULL.


The documentation for this struct was generated from the following file: