Toast Engine
Loading...
Searching...
No Matches
scripting::ScriptDispatch Class Reference

Static Public Member Functions

static void enqueue (size_t vm_index, std::move_only_function< void()> job)
 Queues job which runs while the interpreter vm_index is owned.
static auto mustQueue (size_t vm_index) noexcept -> bool
 True when a call from this thread into the interpreter vm_index has to join the queue instead of running.
static auto pending () noexcept -> size_t
 Number of jobs waiting for delivery.
static auto deliver (int max_rounds=4) -> size_t
 Runs the queued work.
static void clear () noexcept
 Drops everything that is still queued without running it; used when the world is torn down.

Member Function Documentation

◆ deliver()

auto scripting::ScriptDispatch::deliver ( int max_rounds = 4) -> size_t
static

Runs the queued work.

Parameters
max_roundswork queued by delivered work is delivered in further rounds, up to this many
Returns
how many jobs ran
Here is the caller graph for this function:

The documentation for this class was generated from the following files:
  • engine/src/toast/scripting/script_dispatch.hpp
  • engine/src/toast/scripting/script_dispatch.cpp