function's are now callable objects
This commit is contained in:
parent
bf517facd1
commit
d3d53599f7
@ -1189,6 +1189,8 @@ function thread:newFunction(func,holdme)
|
|||||||
end
|
end
|
||||||
local temp = {
|
local temp = {
|
||||||
OnStatus = multi:newConnection(),
|
OnStatus = multi:newConnection(),
|
||||||
|
OnError = multi:newConnection(),
|
||||||
|
OnReturn = multi:newConnection(),
|
||||||
isTFunc = true,
|
isTFunc = true,
|
||||||
wait = wait,
|
wait = wait,
|
||||||
connect = function(f)
|
connect = function(f)
|
||||||
@ -1198,6 +1200,8 @@ function thread:newFunction(func,holdme)
|
|||||||
return tempConn
|
return tempConn
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
t.OnDeath(function(self,status,...) temp.OnReturn:Fire(...) end)
|
||||||
|
t.OnError(function(self,err) temp.OnError:Fire(err) end)
|
||||||
t.linkedFunction = temp
|
t.linkedFunction = temp
|
||||||
t.statusconnector = temp.OnStatus
|
t.statusconnector = temp.OnStatus
|
||||||
return temp
|
return temp
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user