1 engine.log("info","Initializing Asynchronous environment")
3 dofile(SCRIPTDIR .. DIR_DELIM .. "misc_helpers.lua")
5 function engine.job_processor(serialized_function, serialized_data)
7 local fct = marshal.decode(serialized_function)
8 local params = marshal.decode(serialized_data)
9 local retval = marshal.encode(nil)
11 if fct ~= nil and type(fct) == "function" then
12 local result = fct(params)
13 retval = marshal.encode(result)
15 engine.log("error","ASYNC WORKER: unable to deserialize function")
18 return retval,retval:len()