File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ use crate::JoinHandle;
19
19
/// When run, the task polls `future`. When woken up, it gets scheduled for running by the
20
20
/// `schedule` function. Argument `tag` is an arbitrary piece of data stored inside the task.
21
21
///
22
+ /// The schedule function should not attempt to run the task nor to drop it. Instead, it should
23
+ /// push the task into some kind of queue so that it can be processed later.
24
+ ///
22
25
/// If you need to spawn a future that does not implement [`Send`], consider using the
23
26
/// [`spawn_local`] function instead.
24
27
///
71
74
/// When run, the task polls `future`. When woken up, it gets scheduled for running by the
72
75
/// `schedule` function. Argument `tag` is an arbitrary piece of data stored inside the task.
73
76
///
77
+ /// The schedule function should not attempt to run the task nor to drop it. Instead, it should
78
+ /// push the task into some kind of queue so that it can be processed later.
79
+ ///
74
80
/// Unlike [`spawn`], this function does not require the future to implement [`Send`]. If the
75
81
/// [`Task`] reference is run or dropped on a thread it was not created on, a panic will occur.
76
82
///
You can’t perform that action at this time.
0 commit comments