some bugfix for gate/socket lib

This commit is contained in:
云风
2013-08-24 00:14:01 +08:00
parent 424c84915b
commit 52cf864037
5 changed files with 549 additions and 18 deletions

View File

@@ -252,13 +252,17 @@ function socket.unlock(id)
local co = coroutine.running()
assert(lock_set[co])
lock_set[co] = nil
repeat
while true do
co = next(lock_set)
if co == nil then
break
end
lock_set[co] = nil
until skynet.wakeup(co)
if skynet.wakeup(co) then
break
else
lock_set[co] = nil
end
end
end
-- abandon use to forward socket id to other service