From c36f4065aa44bedf918150f1e651cf49537798d6 Mon Sep 17 00:00:00 2001 From: Steve Lau Date: Fri, 22 Mar 2024 10:38:37 +0800 Subject: [PATCH] Doc: correct a statement feature singlethreaded eliminates Send bound --- openraft/src/docs/feature_flags/feature-flags.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openraft/src/docs/feature_flags/feature-flags.md b/openraft/src/docs/feature_flags/feature-flags.md index 94b9875eb..d87ef9d47 100644 --- a/openraft/src/docs/feature_flags/feature-flags.md +++ b/openraft/src/docs/feature_flags/feature-flags.md @@ -74,7 +74,7 @@ Removes `Send` and `Sync` bounds from `AppData`, `AppDataResponse`, `RaftEntry`, and other types to force the asynchronous runtime to spawn any tasks in the current thread. This is for any single-threaded application that never allows a raft instance to be shared among multiple threads. This feature relies on the `async_fn_in_trait` language feature that is officially supported from Rust 1.75.0. -If the feature is enabled, affected asynchronous trait methods require `Send` bounds. +If the feature is enabled, affected asynchronous trait methods will not require `Send` bounds. In order to use the feature, `AsyncRuntime::spawn` should invoke `tokio::task::spawn_local` or equivalents.