mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-22 23:33:53 +01:00
Delete useless threading utils
This commit is contained in:
parent
7f36221d45
commit
847bca6f69
1
init.lua
1
init.lua
@ -66,7 +66,6 @@ local components = {
|
|||||||
player = {},
|
player = {},
|
||||||
table = {},
|
table = {},
|
||||||
text = {string = "local"},
|
text = {string = "local"},
|
||||||
threading = {},
|
|
||||||
vector = {},
|
vector = {},
|
||||||
trie = {}
|
trie = {}
|
||||||
}
|
}
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
locks={}
|
|
||||||
function request(resource, func, ...)
|
|
||||||
if locks[resource] then
|
|
||||||
table.insert(locks[resource], {func=func, args={...}})
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
locks[resource]={}
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
function free(resource)
|
|
||||||
if locks[resource] then
|
|
||||||
local first=locks[resource][1]
|
|
||||||
if first then
|
|
||||||
first.func(unpack(first.args), true)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
locks[resource]=nil
|
|
||||||
return true
|
|
||||||
end
|
|
Loading…
Reference in New Issue
Block a user