aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_event.lua
diff options
context:
space:
mode:
Diffstat (limited to 'net/server_event.lua')
-rw-r--r--net/server_event.lua15
1 files changed, 14 insertions, 1 deletions
diff --git a/net/server_event.lua b/net/server_event.lua
index dde13e61..c28c5ce2 100644
--- a/net/server_event.lua
+++ b/net/server_event.lua
@@ -282,8 +282,21 @@ do
return nointerface, noreading, nowriting
end
+ --TODO: Deprecate
function interface_mt:lock_read(switch)
- return self:_lock(self.nointerface, switch, self.nowriting);
+ if switch then
+ return self:pause();
+ else
+ return self:resume();
+ end
+ end
+
+ function interface_mt:pause()
+ return self:_lock(self.nointerface, true, self.nowriting);
+ end
+
+ function interface_mt:resume()
+ return self:_lock(self.nointerface, false, self.nowriting);
end
function interface_mt:counter(c)