Viewing File: /opt/alt/python35/lib/python3.5/site-packages/async_timeout/__pycache__/__init__.cpython-35.pyc
>Y @ s5 d d l Z d Z Gd d d Z d d Z d S) Nz1.3.0c @ s e Z d Z d Z d d d d Z d d Z d d Z e j d
d Z e j d d
Z
e d d Z d d Z
d d Z d d Z d S)timeouta timeout context manager.
Useful in cases when you want to apply timeout logic around block
of code or in cases when asyncio.wait_for is not suitable. For example:
>>> with timeout(0.001):
... async with aiohttp.get('https://github.com') as r:
... await r.text()
timeout - value in seconds or None to disable timeout logic
loop - asyncio compatible event loop
loopNc C sg | d k r | d k r d } | | _ | d k r? t j } | | _ d | _ d | _ d | _ d S)Nr F)_timeoutasyncioZget_event_loop_loop_task
_cancelled_cancel_handler)selfr r r /__init__.py__init__ s ztimeout.__init__c C s
| j S)N) _do_enter)r
r r r __enter__ s ztimeout.__enter__c C s | j | d S)N)_do_exit)r
exc_typeexc_valexc_tbr r r __exit__# s ztimeout.__exit__c C s
| j S)N)r )r
r r r
__aenter__&