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

Fix modstore/favourites hang by adding asynchronous lua job support

This commit is contained in:
sapier 2013-11-26 18:15:31 +01:00
parent b08d7558de
commit 2e66aca357
27 changed files with 2271 additions and 559 deletions

View file

@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "cpp_api/s_base.h"
#include "cpp_api/s_mainmenu.h"
#include "lua_api/l_async_events.h"
/*****************************************************************************/
/* Scripting <-> Main Menu Interface */
@ -37,8 +38,16 @@ public:
// use ScriptApiBase::loadMod() or ScriptApiBase::loadScript()
// to load scripts
/* global step handler to pass back async events */
void Step();
/* pass async events from engine to async threads */
unsigned int DoAsync(std::string serialized_fct,
std::string serialized_params);
private:
void InitializeModApi(lua_State *L, int top);
AsyncEngine m_AsyncEngine;
};