diff options
Diffstat (limited to 'builtin/async')
-rw-r--r-- | builtin/async/init.lua | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/builtin/async/init.lua b/builtin/async/init.lua index 1b2549685..3803994d6 100644 --- a/builtin/async/init.lua +++ b/builtin/async/init.lua @@ -1,16 +1,10 @@ core.log("info", "Initializing Asynchronous environment") -function core.job_processor(serialized_func, serialized_param) - local func = loadstring(serialized_func) +function core.job_processor(func, serialized_param) 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 + local retval = core.serialize(func(param)) return retval or core.serialize(nil) end |