
    Pf                     ~    d dl mZ d dlmZmZ eZ G d de          ZdZda	d Z
d Zd	 Zd d
lmZ  ee           dS )    )__version__)IFailedFutureILoggerc                       e Zd ZdZdZdS )_Configa  
    This holds all valid configuration options, accessed as
    class-level variables. For example, if you were using asyncio:

    .. sourcecode:: python

        txaio.config.loop = asyncio.get_event_loop()

    ``loop`` is populated automatically (while importing one of the
    framework-specific libraries) but can be changed before any call
    into this library. Currently, it's only used by :meth:`call_later`
    If using asyncio, you must set this to an event-loop (by default,
    we use asyncio.get_event_loop). If using Twisted, set this to a
    reactor instance (by default we "from twisted.internet import
    reactor" on the first call to call_later)
    N)__name__
__module____qualname____doc__loop     @/var/www/html/env/lib/python3.11/site-packages/txaio/__init__.pyr   r   &   s         " DDDr   r   )!with_configusing_twistedusing_asynciouse_twisteduse_asyncioconfigcreate_futurecreate_future_successcreate_future_errorcreate_failure	as_future	is_futurerejectresolvecanceladd_callbacksgather	is_called
call_laterfailure_messagefailure_tracebackfailure_format_tracebackmake_batched_timermake_loggerstart_loggingset_global_log_levelget_global_log_leveladd_log_categoriesr   r   sleeptime_nsperf_counter_nsNc                      t           2t           dk    r't          d                    t                               da ddlm}  t          |            dd l}d|_        d|_        d S )NtwistedExplicitly using '{}' alreadyr   )txTF)_explicit_frameworkRuntimeErrorformattxaior2   _use_frameworkr   r   )r2   r6   s     r   r   r   k   sv    &+>)+K+K:AABUVVWWW#2LLLEEr   c                      t           2t           dk    r't          d                    t                               da ddlm}  t          |            dd l}d|_        d|_        d S )Nasyncior1   r   )aioFT)r3   r4   r5   r6   r:   r7   r   r   )r:   r6   s     r   r   r   w   sv    &+>)+K+K:AABUVVWWW#3LLLEEr   c           	      j    ddl }t          D ]&}|dv rt          ||t          | |                     'dS )zc
    Internal helper, to set this modules methods to a specified
    framework helper-methods.
    r   N)r   r   )r6   __all__setattrgetattr)moduler6   method_names      r   r7   r7      sX    
 LLL B B888{GFK$@$@AAAAB Br   )_unframework)txaio._versionr   txaio.interfacesr   r   versionobjectr   r<   r3   r   r   r7   r6   rA   r   r   r   <module>rF      s   8 ' & & & & & 3 3 3 3 3 3 3 3
    f   **Z  	  	  	 	 	 		B 	B 	B       |     r   