golden hour
/opt/saltstack/salt/lib/python3.10/site-packages/salt/ext/tornado/__pycache__
⬆️ Go Up
Upload
File/Folder
Size
Actions
__init__.cpython-310.pyc
378 B
Del
OK
_locale_data.cpython-310.pyc
3.23 KB
Del
OK
auth.cpython-310.pyc
39.18 KB
Del
OK
autoreload.cpython-310.pyc
7.02 KB
Del
OK
concurrent.cpython-310.pyc
17.24 KB
Del
OK
curl_httpclient.cpython-310.pyc
12.8 KB
Del
OK
escape.cpython-310.pyc
9.89 KB
Del
OK
gen.cpython-310.pyc
38.39 KB
Del
OK
http1connection.cpython-310.pyc
19.47 KB
Del
OK
httpclient.cpython-310.pyc
25.19 KB
Del
OK
httpserver.cpython-310.pyc
11.45 KB
Del
OK
httputil.cpython-310.pyc
29.84 KB
Del
OK
ioloop.cpython-310.pyc
33.19 KB
Del
OK
iostream.cpython-310.pyc
42.97 KB
Del
OK
locale.cpython-310.pyc
15.22 KB
Del
OK
locks.cpython-310.pyc
16.61 KB
Del
OK
log.cpython-310.pyc
8.07 KB
Del
OK
netutil.cpython-310.pyc
14.32 KB
Del
OK
options.cpython-310.pyc
19.63 KB
Del
OK
process.cpython-310.pyc
10.27 KB
Del
OK
queues.cpython-310.pyc
11.29 KB
Del
OK
routing.cpython-310.pyc
21.08 KB
Del
OK
simple_httpclient.cpython-310.pyc
16.08 KB
Del
OK
stack_context.cpython-310.pyc
10.65 KB
Del
OK
tcpclient.cpython-310.pyc
6.49 KB
Del
OK
tcpserver.cpython-310.pyc
10.06 KB
Del
OK
template.cpython-310.pyc
30.52 KB
Del
OK
testing.cpython-310.pyc
24.61 KB
Del
OK
util.cpython-310.pyc
13.72 KB
Del
OK
web.cpython-310.pyc
105.22 KB
Del
OK
websocket.cpython-310.pyc
39.08 KB
Del
OK
wsgi.cpython-310.pyc
11.5 KB
Del
OK
Edit: gen.cpython-310.pyc
o �xe�� � @ s� d Z ddlmZmZmZ ddlZddlZddlZddlZddl Z ddl Z ddlZddlZddl m mZ ddlmZmZmZmZ ddlmZ ddlmZ ddl mZ ddlmZmZ zzdd lmZ W n eys dd lmZ Y nw W n ey� d ejvr�� dZY nw z2zddl m!Z" W n ey� ddl#m!Z" Y nw zddl$m%Z% W n ey� ddl#m%Z% Y nw W n ey� d ejvrƂ dd lm"Z" dd� Z%Y nw er�ddl&Z&nddl'Z&G dd� de(�Z)G dd� de(�Z*G dd� de(�Z+G dd� de(�Z,G dd� de(�Z-G dd� de(�Z.dd� Z/dd� Z0dTd!d"�Z1e�2� Z3d#d$� Z4d%d&� Z5G d'd(� d(e(�Z6G d)d*� d*e7�Z8G d+d,� d,e7�Z9G d-d.� d.e9�Z:G d/d0� d0e9�Z;G d1d2� d2e9�Z<d3d4� Z=G d5d6� d6e9�Z>d7d8� Z?dUd:d;�Z@e@ZAG d<d=� d=e9�ZBdUd>d?�ZCd@dA� ZDdVdBdC�ZEdDdE� ZFe� ZGeG�Hd� e� ZIdFeI_ eI�Hd� G dGdH� dHe7�ZJe�KdIdJdKg�ZLdLdM� ZMe jNdNk�r�eOe �PdO�� ne1dPdQ� �ZQdRdS� ZRedu�r�eeR�ZRzddlSZTW n e�y� Y dS w e dS dS )Wa� ``tornado.gen`` is a generator-based interface to make it easier to work in an asynchronous environment. Code using the ``gen`` module is technically asynchronous, but it is written as a single generator instead of a collection of separate functions. For example, the following asynchronous handler: .. testcode:: class AsyncHandler(RequestHandler): @asynchronous def get(self): http_client = AsyncHTTPClient() http_client.fetch("http://example.com", callback=self.on_fetch) def on_fetch(self, response): do_something_with_response(response) self.render("template.html") .. testoutput:: :hide: could be written with ``gen`` as: .. testcode:: class GenAsyncHandler(RequestHandler): @gen.coroutine def get(self): http_client = AsyncHTTPClient() response = yield http_client.fetch("http://example.com") do_something_with_response(response) self.render("template.html") .. testoutput:: :hide: Most asynchronous functions in Tornado return a `.Future`; yielding this object returns its `~.Future.result`. You can also yield a list or dict of ``Futures``, which will be started at the same time and run in parallel; a list or dict of results will be returned when they are all finished: .. testcode:: @gen.coroutine def get(self): http_client = AsyncHTTPClient() response1, response2 = yield [http_client.fetch(url1), http_client.fetch(url2)] response_dict = yield dict(response3=http_client.fetch(url3), response4=http_client.fetch(url4)) response3 = response_dict['response3'] response4 = response_dict['response4'] .. testoutput:: :hide: If the `~functools.singledispatch` library is available (standard in Python 3.4, available via the `singledispatch <https://pypi.python.org/pypi/singledispatch>`_ package on older versions), additional types of objects may be yielded. Tornado includes support for ``asyncio.Future`` and Twisted's ``Deferred`` class when ``tornado.platform.asyncio`` and ``tornado.platform.twisted`` are imported. See the `convert_yielded` function to extend this mechanism. .. versionchanged:: 3.2 Dict support added. .. versionchanged:: 4.1 Support added for yielding ``asyncio`` Futures and Twisted Deferreds via ``singledispatch``. � )�absolute_import�division�print_functionN)�Future�TracebackFuture� is_future�chain_future)�IOLoop)�app_log)� stack_context)�PY3�raise_exc_info)�singledispatchZAPPENGINE_RUNTIME)� Generator)�isawaitable)� GeneratorTypec C � dS �NF� )�xr r �H/opt/saltstack/salt/lib/python3.10/site-packages/salt/ext/tornado/gen.pyr � � r c @ � e Zd ZdS )� KeyReuseErrorN��__name__� __module__�__qualname__r r r r r � � r c @ r )�UnknownKeyErrorNr r r r r r � r r c @ r )�LeakedCallbackErrorNr r r r r r � r r c @ r )� BadYieldErrorNr r r r r r! � r r! c @ r )�ReturnValueIgnoredErrorNr r r r r r"