1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Async environment for mods to do concurrent tasks (#11131)

This commit is contained in:
sfan5 2022-05-02 20:55:04 +02:00
parent 663c936428
commit e7659883cc
38 changed files with 1646 additions and 48 deletions

View file

@ -292,7 +292,7 @@ public:
virtual const std::vector<ModSpec> &getMods() const;
virtual const ModSpec* getModSpec(const std::string &modname) const;
std::string getBuiltinLuaPath();
static std::string getBuiltinLuaPath();
virtual std::string getWorldPath() const { return m_path_world; }
inline bool isSingleplayer() const
@ -385,6 +385,12 @@ public:
static bool migrateModStorageDatabase(const GameParams &game_params,
const Settings &cmd_args);
// Lua files registered for init of async env, pair of modname + path
std::vector<std::pair<std::string, std::string>> m_async_init_files;
// Serialized data transferred into async envs at init time
MutexedVariable<std::string> m_async_globals_data;
// Bind address
Address m_bind_addr;