File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,13 @@ use proc_macro::TokenStream;
3939/// function is called often, it is preferable to create the runtime using the
4040/// runtime builder so the runtime can be reused across calls.
4141///
42+ /// # Non-worker async function
43+ ///
44+ /// Note that the async function marked with this macro does not run as a
45+ /// worker. The expectation is that other tasks are spawned by the function here.
46+ /// Awaiting on other futures from the function provided here will not
47+ /// perform as fast as those spawned as workers.
48+ ///
4249/// # Multi-threaded runtime
4350///
4451/// To use the multi-threaded runtime, the macro can be configured using
Original file line number Diff line number Diff line change @@ -240,6 +240,13 @@ impl Runtime {
240240 /// complete, and yielding its resolved result. Any tasks or timers
241241 /// which the future spawns internally will be executed on the runtime.
242242 ///
243+ /// # Non-worker future
244+ ///
245+ /// Note that the future required by this function does not run as a
246+ /// worker. The expectation is that other tasks are spawned by the future here.
247+ /// Awaiting on other futures from the future provided here will not
248+ /// perform as fast as those spawned as workers.
249+ ///
243250 /// # Multi thread scheduler
244251 ///
245252 /// When the multi thread scheduler is used this will allow futures
You can’t perform that action at this time.
0 commit comments