minetest/builtin/async/init.lua

12 lines
251 B
Lua
Raw Normal View History

2014-04-27 23:55:49 +02:00
2014-04-28 03:02:48 +02:00
core.log("info", "Initializing Asynchronous environment")
2014-04-27 23:55:49 +02:00
2021-08-28 12:15:12 +02:00
function core.job_processor(func, serialized_param)
2014-04-27 23:55:49 +02:00
local param = core.deserialize(serialized_param)
2021-08-28 12:15:12 +02:00
local retval = core.serialize(func(param))
2014-04-27 23:55:49 +02:00
return retval or core.serialize(nil)
end