[−][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
fn call_thunk<'vm>(
&'vm self,
closure: GcPtr<ClosureData>
) -> FutureValue<Execute<RootedThread>>
&'vm self,
closure: GcPtr<ClosureData>
) -> FutureValue<Execute<RootedThread>>
Evaluates a zero argument function (a thunk)
fn execute_io<'vm>(
&'vm self,
value: Variants
) -> FutureValue<Execute<RootedThread>>
&'vm self,
value: Variants
) -> FutureValue<Execute<RootedThread>>
Executes an IO
action
fn call_function<'b>(
&'b self,
stack: OwnedContext<'b>,
args: VmIndex
) -> Result<Async<Option<OwnedContext<'b>>>>
&'b self,
stack: OwnedContext<'b>,
args: VmIndex
) -> Result<Async<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) -> Result<Async<OwnedContext>>
fn set_global(
&self,
name: Symbol,
typ: ArcType,
metadata: Metadata,
value: Value
) -> Result<()>
&self,
name: Symbol,
typ: ArcType,
metadata: Metadata,
value: Value
) -> Result<()>
fn deep_clone_value(&self, owner: &Thread, value: Variants) -> Result<Value>
owner
is theread that owns value
which is not necessarily the same as self
fn can_share_values_with(&self, gc: &mut Gc, other: &Thread) -> bool
Provided methods
fn call_thunk_top<'vm>(
&'vm self,
closure: GcPtr<ClosureData>
) -> BoxFuture<'static, RootedValue<RootedThread>, Error> where
Self: Send + Sync,
&'vm self,
closure: GcPtr<ClosureData>
) -> BoxFuture<'static, RootedValue<RootedThread>, Error> where
Self: Send + Sync,
fn execute_io_top<'vm>(
&'vm self,
value: Variants
) -> BoxFuture<'static, RootedValue<RootedThread>, Error> where
Self: Send + Sync,
&'vm self,
value: Variants
) -> BoxFuture<'static, RootedValue<RootedThread>, Error> where
Self: Send + Sync,
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<'vm>(
&'vm self,
closure: GcPtr<ClosureData>
) -> FutureValue<Execute<RootedThread>>
[src]
&'vm self,
closure: GcPtr<ClosureData>
) -> FutureValue<Execute<RootedThread>>
fn execute_io<'vm>(
&'vm self,
value: Variants
) -> FutureValue<Execute<RootedThread>>
[src]
&'vm self,
value: Variants
) -> FutureValue<Execute<RootedThread>>
Calls a module, allowed to to run IO expressions
fn call_function<'b>(
&'b self,
context: OwnedContext<'b>,
args: VmIndex
) -> Result<Async<Option<OwnedContext<'b>>>>
[src]
&'b self,
context: OwnedContext<'b>,
args: VmIndex
) -> Result<Async<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) -> Result<Async<OwnedContext>>
[src]
fn set_global(
&self,
name: Symbol,
typ: ArcType,
metadata: Metadata,
value: Value
) -> Result<()>
[src]
&self,
name: Symbol,
typ: ArcType,
metadata: Metadata,
value: Value
) -> Result<()>
fn deep_clone_value(&self, owner: &Thread, value: Variants) -> Result<Value>
[src]
fn can_share_values_with(&self, gc: &mut Gc, other: &Thread) -> bool
[src]
fn call_thunk_top<'vm>(
&'vm self,
closure: GcPtr<ClosureData>
) -> BoxFuture<'static, RootedValue<RootedThread>, Error> where
Self: Send + Sync,
[src]
&'vm self,
closure: GcPtr<ClosureData>
) -> BoxFuture<'static, RootedValue<RootedThread>, Error> where
Self: Send + Sync,
fn execute_io_top<'vm>(
&'vm self,
value: Variants
) -> BoxFuture<'static, RootedValue<RootedThread>, Error> where
Self: Send + Sync,
[src]
&'vm self,
value: Variants
) -> BoxFuture<'static, RootedValue<RootedThread>, Error> where
Self: Send + Sync,