o
    j                     @   s>   d dl Z e eZd dlmZ d dlmZ G dd deZdS )    N)
ThreadPool)AuxProcBasec                       s>   e Zd ZdZd fdd	Zedd Zdd Zd	d
 Z  Z	S )ThreadAuxProca  ThreadAuxProc processes auxiliary methods asynchronously in another
    thread using the undocumented ``multiprocessing.pool.ThreadPool`` class.
    This is available in Python 2.7. It's possibly there since 2.6 as well but
    it's hard to tell since it's not documented.

    :param pool_size: Max. number of threads that can be used to process
        methods in auxiliary queue in parallel.
       c                    s   t t|   d | _|| _d S N)superr   __init__pool_ThreadAuxProc__pool_size)self	pool_size	__class__ T/var/www/html/LicenciasMiG/venv/lib/python3.10/site-packages/spyne/auxproc/thread.pyr   &   s   
zThreadAuxProc.__init__c                 C   s   | j S r   )r
   )r   r   r   r   r   ,   s   zThreadAuxProc.pool_sizec                 O   s   | j | j||f| | d S r   )r	   apply_asyncprocess)r   serverctxargskwargsr   r   r   process_context0   s   zThreadAuxProc.process_contextc                 C   s   t | j| _d S r   )r   r
   r	   )r   r   r   r   r   
initialize3   s   zThreadAuxProc.initialize)r   )
__name__
__module____qualname____doc__r   propertyr   r   r   __classcell__r   r   r   r   r      s    	
r   )	logging	getLoggerr   loggermultiprocessing.poolr   spyne.auxprocr   r   r   r   r   r   <module>   s
   
