summaryrefslogtreecommitdiffstats
path: root/tokio/src/task
diff options
context:
space:
mode:
authorgliderkite <gliderkite@users.noreply.github.com>2020-01-22 16:34:09 +0000
committerLucio Franco <luciofranco14@gmail.com>2020-01-22 11:34:09 -0500
commit5bbf9762681ae75c6489558e15f894d0466516a3 (patch)
tree3bd4129bef5bd662547af05c132d6d6d160947eb /tokio/src/task
parent90969420a2ac1562e3ac523e14bae064e169bf80 (diff)
Enhance documentation of tokio::task::block_in_place (#2155)
Diffstat (limited to 'tokio/src/task')
-rw-r--r--tokio/src/task/blocking.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tokio/src/task/blocking.rs b/tokio/src/task/blocking.rs
index a155197f..69f4cf0a 100644
--- a/tokio/src/task/blocking.rs
+++ b/tokio/src/task/blocking.rs
@@ -10,6 +10,12 @@ cfg_rt_threaded! {
/// (possibly new) thread, and only then poll the task. Note that this requires
/// additional synchronization.
///
+ /// # Note
+ ///
+ /// This function can only be called from a spawned task when working with
+ /// the [threaded scheduler](https://docs.rs/tokio/0.2.10/tokio/runtime/index.html#threaded-scheduler).
+ /// Consider using [tokio::task::spawn_blocking](https://docs.rs/tokio/0.2.10/tokio/task/fn.spawn_blocking.html).
+ ///
/// # Examples
///
/// ```