[][src]Trait drone_core::thr::Thread

pub trait Thread: Sized + Sync + 'static {
    type Local: ThreadLocal;
    fn first() -> *const Self;
fn fib_chain(&self) -> &Chain;
unsafe fn local(&self) -> &Self::Local; }

Generic thread.

Associated Types

type Local: ThreadLocal

The thread-local storage.

Loading content...

Required methods

fn first() -> *const Self

Returns a pointer to the first thread in the thread array.

fn fib_chain(&self) -> &Chain

Returns a reference to the fiber chain.

unsafe fn local(&self) -> &Self::Local

Returns a reference to the thread-local storage of the thread.

local function should be used instead of this method.

Safety

This method is unsafe because Thread is Sync while Thread::Local is not.

Loading content...

Implementors

Loading content...