File: init.lua

package info (click to toggle)
minetest 0.4.10%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 15,288 kB
  • ctags: 9,668
  • sloc: cpp: 86,972; makefile: 695; python: 659; sh: 525; java: 383; xml: 81
file content (17 lines) | stat: -rw-r--r-- 432 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

core.log("info", "Initializing Asynchronous environment")

function core.job_processor(serialized_func, serialized_param)
	local func = loadstring(serialized_func)
	local param = core.deserialize(serialized_param)
	local retval = nil

	if type(func) == "function" then
		retval = core.serialize(func(param))
	else
		core.log("error", "ASYNC WORKER: Unable to deserialize function")
	end

	return retval or core.serialize(nil)
end