Posted 12 July 2015 - 08:43 PM
Hello there, I am trying to write a very tricky piece of code that is having a lot of issues.
I am trying to override parallel.waitForAny() to run additional tasks if conditions are met. The code looks like this:
What is the proper way to do this so that it can pass through the function calls to the backed up function oldParallelWFA?
(And before anyone asks, I am taking this approach because I have to) (Specifically I am trying to override stuff in the new O[OS] 2.2 alphas that lock the filesystem).
EDIT: The error is "Expected function, got table."
I am trying to override parallel.waitForAny() to run additional tasks if conditions are met. The code looks like this:
local oldParallelWFA = parallel.waitForAny
function parallel.waitForAny(...)
-- Blah blah blah additional stuff.
oldParallelWFA(arg) -- Crashes
end
What is the proper way to do this so that it can pass through the function calls to the backed up function oldParallelWFA?
(And before anyone asks, I am taking this approach because I have to) (Specifically I am trying to override stuff in the new O[OS] 2.2 alphas that lock the filesystem).
EDIT: The error is "Expected function, got table."
Edited on 12 July 2015 - 06:45 PM