mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-24 00:00:11 +02:00
task: link to lib.rs in spawn_blocking documentation (#2426)
This commit is contained in:
@@ -39,10 +39,9 @@ cfg_rt_threaded! {
|
||||
cfg_blocking! {
|
||||
/// Runs the provided closure on a thread where blocking is acceptable.
|
||||
///
|
||||
/// In general, issuing a blocking call or performing a lot of compute in a future without
|
||||
/// yielding is not okay, as it may prevent the executor from driving other futures forward.
|
||||
/// A closure that is run through this method will instead be run on a dedicated thread pool for
|
||||
/// such blocking tasks without holding up the main futures executor.
|
||||
/// More information about the blocking threads is available at [CPU-bound tasks and blocking code][blocking].
|
||||
///
|
||||
/// [blocking]: ../index.html#cpu-bound-tasks-and-blocking-code
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user