Struct rayon_core::job::StackJob
source · pub(crate) struct StackJob<L, F, R>{
pub(crate) latch: L,
func: UnsafeCell<Option<F>>,
result: UnsafeCell<JobResult<R>>,
}
Expand description
A job that will be owned by a stack slot. This means that when it
executes it need not free any heap data, the cleanup occurs when
the stack frame is later popped. The function parameter indicates
true
if the job was stolen – executed on a different thread.
Fields§
§latch: L
§func: UnsafeCell<Option<F>>
§result: UnsafeCell<JobResult<R>>
Implementations§
source§impl<L, F, R> StackJob<L, F, R>
impl<L, F, R> StackJob<L, F, R>
pub(crate) fn new(func: F, latch: L) -> StackJob<L, F, R>
pub(crate) unsafe fn as_job_ref(&self) -> JobRef
pub(crate) unsafe fn run_inline(self, stolen: bool) -> R
pub(crate) unsafe fn into_result(self) -> R
Trait Implementations§
Auto Trait Implementations§
impl<L, F, R> !Freeze for StackJob<L, F, R>
impl<L, F, R> !RefUnwindSafe for StackJob<L, F, R>
impl<L, F, R> Send for StackJob<L, F, R>where
L: Send,
impl<L, F, R> !Sync for StackJob<L, F, R>
impl<L, F, R> Unpin for StackJob<L, F, R>
impl<L, F, R> !UnwindSafe for StackJob<L, F, R>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more