Your IP : 216.73.216.196
V�EVJ, � @ s� d d l Z d d l Z d d l Z d d l m Z d d l Z y d d l Z d d l m Z Wn e k
r� d Z d Z Yn Xd d � Z
d d � Z Gd d � d e � Z
e j d
d � � Z d d
� Z d S)� N)�_utils)�patcherc sK � f d d � } � s | r# | St | � d k rC | | d � S| Sd S)a< Acquires & releases a read lock around call into decorated method.
NOTE(harlowja): if no attribute name is provided then by default the
attribute named '_lock' is looked for (this attribute is expected to be
a :py:class:`.ReaderWriterLock`) in the instance object this decorator
is attached to.
c s: � j d d � � t j � � � � f d d � � } | S)N�lock�_lockc s7 t | � � } | j � � � | | | � SWd QRXd S)N)�getattr� read_lock)�self�args�kwargs�rw_lock)� attr_name�f� �?/opt/alt/python35/lib/python3.5/site-packages/fasteners/lock.py�wrapper2 s
z/read_locked.<locals>.decorator.<locals>.wrapper)�get�six�wraps)r
r )r
)r r
r � decorator/ s $zread_locked.<locals>.decorator� r N)�len)r r
r r )r
r �read_locked&