![]() |
ArkScript
A small, fast, functional and scripting language for video games
|
#include <Future.hpp>
Public Member Functions | |
Future (ExecutionContext *context, VM *vm, std::vector< Value > &args) | |
Create a Future and immediately start it through std::async. | |
Value | resolve () |
Await the future, blocking the thread it is ran on. | |
Private Attributes | |
ExecutionContext * | m_context |
VM * | m_vm |
std::future< Value > | m_value |
The actual thread. | |
Definition at line 23 of file Future.hpp.
Ark::internal::Future::Future | ( | ExecutionContext * | context, |
VM * | vm, | ||
std::vector< Value > & | args ) |
Create a Future and immediately start it through std::async.
context | a dedicated context for the future to run on |
vm | non owning pointer to the VM |
args | list of (function, arguments...) to create the future |
Definition at line 7 of file Future.cpp.
Value Ark::internal::Future::resolve | ( | ) |
Await the future, blocking the thread it is ran on.
Definition at line 13 of file Future.cpp.
References Ark::Nil.
|
private |
Definition at line 41 of file Future.hpp.
|
private |
The actual thread.
Definition at line 43 of file Future.hpp.
|
private |
Definition at line 42 of file Future.hpp.