MCPcopy Index your code
hub / github.com/pyload/pyload / lock

Method lock

module/lib/beaker/session.py:303–312  ·  view source on GitHub ↗

Locks this session against other processes/threads. This is automatic when load/save is called. ***use with caution*** and always with a corresponding 'unlock' inside a "finally:" block, as a stray lock typically cannot be unlocked without shutting down the

(self)

Source from the content-addressed store, hash-verified

301 # the original mod_python code i was ripping off but they really
302 # have no use here.
303 def lock(self):
304 """Locks this session against other processes/threads. This is
305 automatic when load/save is called.
306
307 ***use with caution*** and always with a corresponding 'unlock'
308 inside a "finally:" block, as a stray lock typically cannot be
309 unlocked without shutting down the whole application.
310
311 """
312 self.namespace.acquire_write_lock()
313
314 def unlock(self):
315 """Unlocks this session against other processes/threads. This

Callers 5

__init__Method · 0.80
loadDataMethod · 0.80
saveDataMethod · 0.80
updateCountMethod · 0.80
__getattr__Method · 0.80

Calls 1

acquire_write_lockMethod · 0.45

Tested by

no test coverage detected