|
Toast Engine
|
Runs a plan of jobs on the thread pool, one interpreter per job. More...
#include <cstddef>#include <memory>#include <toast/export.hpp>#include <type_traits>#include <vector>

Go to the source code of this file.
Classes | |
| struct | toast::_detail::WaveJob |
| class | toast::_detail::ItemRunner |
| struct | toast::_detail::ExecuteOptions |
Namespaces | |
| namespace | toast::_detail |
| Member-robber pattern used by the generated reflection code. | |
Functions | |
| void | toast::_detail::runJobs (const std::vector< WaveJob > &jobs, size_t item_count, ItemRunner run_item, const ExecuteOptions &options={}) |
| Runs the jobs of a plan in parallel and returns once every item has run. | |
Runs a plan of jobs on the thread pool, one interpreter per job.
Whatever has to run Lua on one interpreter is one job, and a job's items run one after the other, so an interpreter is only ever used by one worker at a time and nothing waits for another worker's interpreter. The tick waves, the construction of scripts in a prefab and the init/begin of a tree all run through here