[−][src]Trait gluon_vm::thread::ThreadInternal
Internal functions for interacting with threads. These functions should be considered both unsafe and unstable.
Required methods
fn context(&self) -> OwnedContext<'_>
Locks and retrives this threads stack
fn root_value<'vm, T>(&'vm self, value: Variants<'_>) -> RootedValue<T> where
T: VmRoot<'vm>,
T: VmRoot<'vm>,
Roots a value
#[must_use]fn call_thunk<'life0, 'life1, 'async_trait>(
&'life0 self,
closure: &'life1 GcPtr<ClosureData>
) -> Pin<Box<dyn Future<Output = Result<RootedValue<RootedThread>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
&'life0 self,
closure: &'life1 GcPtr<ClosureData>
) -> Pin<Box<dyn Future<Output = Result<RootedValue<RootedThread>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Evaluates a zero argument function (a thunk)
#[must_use]fn execute_io<'life0, 'life1, 'async_trait>(
&'life0 self,
value: Variants<'life1>
) -> Pin<Box<dyn Future<Output = Result<RootedValue<RootedThread>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
&'life0 self,
value: Variants<'life1>
) -> Pin<Box<dyn Future<Output = Result<RootedValue<RootedThread>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Executes an IO
action
fn call_function<'b>(
&'b self,
cx: &mut Context<'_>,
stack: OwnedContext<'b>,
args: VmIndex
) -> Poll<Result<Option<OwnedContext<'b>>>>
&'b self,
cx: &mut Context<'_>,
stack: OwnedContext<'b>,
args: VmIndex
) -> Poll<Result<Option<OwnedContext<'b>>>>
Calls a function on the stack.
When this function is called it is expected that the function exists at
stack.len() - args - 1
and that the arguments are of the correct type
fn resume(&self, cx: &mut Context<'_>) -> Poll<Result<OwnedContext<'_>>>
fn deep_clone_value(
&self,
owner: &Thread,
value: &Value
) -> Result<RootedValue<&Thread>>
&self,
owner: &Thread,
value: &Value
) -> Result<RootedValue<&Thread>>
fn can_share_values_with(&self, gc: &mut Gc, other: &Thread) -> bool
Provided methods
#[must_use]fn call_thunk_top<'life0, 'life1, 'async_trait>(
&'life0 self,
closure: &'life1 GcPtr<ClosureData>
) -> Pin<Box<dyn Future<Output = Result<RootedValue<RootedThread>>> + Send + 'async_trait>> where
Self: Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
&'life0 self,
closure: &'life1 GcPtr<ClosureData>
) -> Pin<Box<dyn Future<Output = Result<RootedValue<RootedThread>>> + Send + 'async_trait>> where
Self: Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
#[must_use]fn execute_io_top<'life0, 'life1, 'async_trait>(
&'life0 self,
value: Variants<'life1>
) -> Pin<Box<dyn Future<Output = Result<RootedValue<RootedThread>>> + Send + 'async_trait>> where
Self: Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
&'life0 self,
value: Variants<'life1>
) -> Pin<Box<dyn Future<Output = Result<RootedValue<RootedThread>>> + Send + 'async_trait>> where
Self: Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
Implementors
impl ThreadInternal for Thread
[src]
fn context(&self) -> OwnedContext<'_>
[src]
fn root_value<'vm, T>(&'vm self, value: Variants<'_>) -> RootedValue<T> where
T: VmRoot<'vm>,
[src]
T: VmRoot<'vm>,
Roots a value
fn call_thunk<'life0, 'life1, 'async_trait>(
&'life0 self,
closure: &'life1 GcPtr<ClosureData>
) -> Pin<Box<dyn Future<Output = Result<RootedValue<RootedThread>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
closure: &'life1 GcPtr<ClosureData>
) -> Pin<Box<dyn Future<Output = Result<RootedValue<RootedThread>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn execute_io<'life0, 'life1, 'async_trait>(
&'life0 self,
value: Variants<'life1>
) -> Pin<Box<dyn Future<Output = Result<RootedValue<RootedThread>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
value: Variants<'life1>
) -> Pin<Box<dyn Future<Output = Result<RootedValue<RootedThread>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Calls a module, allowed to to run IO expressions
fn call_function<'b>(
&'b self,
cx: &mut Context<'_>,
context: OwnedContext<'b>,
args: VmIndex
) -> Poll<Result<Option<OwnedContext<'b>>>>
[src]
&'b self,
cx: &mut Context<'_>,
context: OwnedContext<'b>,
args: VmIndex
) -> Poll<Result<Option<OwnedContext<'b>>>>
Calls a function on the stack.
When this function is called it is expected that the function exists at
stack.len() - args - 1
and that the arguments are of the correct type
fn resume(&self, cx: &mut Context<'_>) -> Poll<Result<OwnedContext<'_>>>
[src]
fn deep_clone_value(
&self,
owner: &Thread,
value: &Value
) -> Result<RootedValue<&Thread>>
[src]
&self,
owner: &Thread,
value: &Value
) -> Result<RootedValue<&Thread>>