cherrypy.lib.locking module

Lock acquisition helpers.

class cherrypy.lib.locking.LockChecker(session_id, timeout)[source]

Bases: object

Keep track of the time and detect if a timeout has expired.

expired()[source]

Check whether the lock checker has expired.

exception cherrypy.lib.locking.LockTimeout[source]

Bases: Exception

Exception when a lock could not be acquired before a timeout period.

class cherrypy.lib.locking.NeverExpires[source]

Bases: object

A representation of a never expiring object.

expired()[source]

Communicate that the object hasn’t expired.

class cherrypy.lib.locking.Timer(expiration)[source]

Bases: object

A simple timer that will indicate when an expiration time has passed.

classmethod after(elapsed)[source]

Return a timer that will expire after elapsed passes.

expired()[source]

Check whether the timer has expired.