Function tarantool::fiber::name_raw

source ·
pub unsafe fn name_raw(id: Option<FiberId>) -> Option<&'static [u8]>
Expand description

Returns the name of the fiber with the given id, or None if fiber wasn’t found. The name is returned as a slice of bytes, because it is allowed to contain nul bytes.

Safety

This functions returns a reference to the data with a limited lifetime (even though it says 'static in the signature). The lifetime of the data depends on the implementation, and should be copied ASAP. Holding this reference across yields is definitely NOT safe.

NOTE: if has_fiber_id returns false this function uses an inefficient implementation based on the lua api.