aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_async.cpp
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2021-02-10 19:50:36 +0100
committerElias Fleckenstein <eliasfleckenstein@web.de>2021-02-10 19:50:36 +0100
commit1fbbb768252f872dfa961d3a73460d996164d527 (patch)
treee9faf93dbd894b253ac3d1f0895b7468e8fee50d /src/script/cpp_api/s_async.cpp
parent74f5f033e04c0d8694815fedb795838d4926cbc9 (diff)
parent9736b9cea5f841bb0e9bb2c9c05c3b2560327064 (diff)
downloaddragonfireclient-1fbbb768252f872dfa961d3a73460d996164d527.tar.xz
Merge branch 'master' of https://github.com/minetest/minetest
Diffstat (limited to 'src/script/cpp_api/s_async.cpp')
-rw-r--r--src/script/cpp_api/s_async.cpp29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/script/cpp_api/s_async.cpp b/src/script/cpp_api/s_async.cpp
index 5f1f9297e..0619b32c0 100644
--- a/src/script/cpp_api/s_async.cpp
+++ b/src/script/cpp_api/s_async.cpp
@@ -158,35 +158,6 @@ void AsyncEngine::step(lua_State *L)
}
/******************************************************************************/
-void AsyncEngine::pushFinishedJobs(lua_State* L) {
- // Result Table
- MutexAutoLock l(resultQueueMutex);
-
- unsigned int index = 1;
- lua_createtable(L, resultQueue.size(), 0);
- int top = lua_gettop(L);
-
- while (!resultQueue.empty()) {
- LuaJobInfo jobDone = resultQueue.front();
- resultQueue.pop_front();
-
- lua_createtable(L, 0, 2); // Pre-allocate space for two map fields
- int top_lvl2 = lua_gettop(L);
-
- lua_pushstring(L, "jobid");
- lua_pushnumber(L, jobDone.id);
- lua_settable(L, top_lvl2);
-
- lua_pushstring(L, "retval");
- lua_pushlstring(L, jobDone.serializedResult.data(),
- jobDone.serializedResult.size());
- lua_settable(L, top_lvl2);
-
- lua_rawseti(L, top, index++);
- }
-}
-
-/******************************************************************************/
void AsyncEngine::prepareEnvironment(lua_State* L, int top)
{
for (StateInitializer &stateInitializer : stateInitializers) {