pub fn defer<'f, F, T>(f: F) -> JoinHandle<'f, T>where
F: FnOnce() -> T + 'f,
T: 'f,
Expand description
Creates a new fiber and schedules it for execution, returning a
JoinHandle
for it.
NOTE: On older versions of tarantool this will create a lua fiber
which is less efficient. You can use ffi::has_fiber_set_ctx
to check if your version of tarantool has api needed for this function
to work efficiently.
Panicking
If JoinHandle::join
is not called on the join handle, a panic will
happen when the join handle is dropped.