pub struct Thread {
pub handle: Option<Arc<Mutex<JoinHandle<Result<Variable, String>>>>>,
}
Expand description
Stores a thread handle.
Fields§
§handle: Option<Arc<Mutex<JoinHandle<Result<Variable, String>>>>>
The handle of the thread.
Implementations§
source§impl Thread
impl Thread
sourcepub fn new(handle: JoinHandle<Result<Variable, String>>) -> Thread
pub fn new(handle: JoinHandle<Result<Variable, String>>) -> Thread
Creates a new thread handle.
sourcepub fn invalidate_handle(
rt: &mut Runtime,
var: Variable
) -> Result<JoinHandle<Result<Variable, String>>, String>
pub fn invalidate_handle( rt: &mut Runtime, var: Variable ) -> Result<JoinHandle<Result<Variable, String>>, String>
Removes the thread handle from the stack. This is to prevent an extra reference when resolving the variable.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Thread
impl Send for Thread
impl Sync for Thread
impl Unpin for Thread
impl UnwindSafe for Thread
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