OpenQuizz
Une application de gestion des contenus pédagogiques
locked_cached_property Class Reference
Inheritance diagram for locked_cached_property:
Collaboration diagram for locked_cached_property:

Public Member Functions

def __init__ (self, func, name=None, doc=None)
 
def __get__ (self, obj, type=None)
 

Data Fields

 func
 
 lock
 

Detailed Description

A decorator that converts a function into a lazy property.  The
function wrapped is called the first time to retrieve the result
and then that calculated result is used the next time you access
the value.  Works like the one in Werkzeug but has a lock for
thread safety.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  func,
  name = None,
  doc = None 
)

Member Function Documentation

◆ __get__()

def __get__ (   self,
  obj,
  type = None 
)

Field Documentation

◆ func

func

◆ lock

lock

The documentation for this class was generated from the following file: