[−][src]Function async_task_ffi::spawn_unchecked_with
pub unsafe fn spawn_unchecked_with<F, S, D>(
future: F,
schedule: S,
data: D
) -> (Runnable<D>, Task<F::Output>) where
F: Future,
S: Fn(Runnable<D>),
Creates a new task with associated data and without Send
, Sync
, and
'static
bounds.
This function is a combination of spawn_unchecked()
and
spawn_with()
, except it does not require Send
and 'static
on
data
.
Safety
- All of the requirements from
spawn_unchecked
. - If
data
is notSend
, it must be used and dropped on the original thread. - If
data
is not'static
, borrowed variables must outlive itsRunnable
.