$72 GRAYBYTE WORDPRESS FILE MANAGER $65

SERVER : in-mum-web1330.main-hosting.eu #1 SMP Mon Feb 10 22:45:17 UTC 2025
SERVER IP : 93.127.173.11 | ADMIN IP 216.73.216.143
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/python37/lib64/python3.7/site-packages/psycopg2/__pycache__/

HOME
Current File : /opt/alt/python37/lib64/python3.7/site-packages/psycopg2/__pycache__//pool.cpython-37.opt-1.pyc
B

*��]��@s^dZddlZddlmZGdd�dej�ZGdd�de�ZGdd	�d	e�ZGd
d�de�Z	dS)z`Connection pooling for psycopg2

This module implements thread-safe (and not) connection pools.
�N)�
extensionsc@seZdZdS)�	PoolErrorN)�__name__�
__module__�__qualname__�rr�@/opt/alt/python37/lib64/python3.7/site-packages/psycopg2/pool.pyrsrc@sFeZdZdZdd�Zddd�Zdd�Zdd	d
�Zddd
�Zdd�Z	dS)�AbstractConnectionPoolzGeneric key-based pooling code.cOs^t|�|_t|�|_d|_||_||_g|_i|_i|_d|_	xt
|j�D]}|��qJWdS)z�Initialize the connection pool.

        New 'minconn' connections are created immediately calling 'connfunc'
        with given parameters. The connection pool will support a maximum of
        about 'maxconn' connections.
        FrN)�int�minconn�maxconn�closed�_args�_kwargs�_pool�_used�_rused�_keys�range�_connect)�selfrr�args�kwargs�irrr�__init__&s

zAbstractConnectionPool.__init__NcCsBtj|j|j�}|dk	r2||j|<||jt|�<n|j�|�|S)z;Create a new connection and assign it to 'key' if not None.N)	�psycopg2Zconnectrrrr�idr�append)r�key�connrrrr<s
zAbstractConnectionPool._connectcCs|jd7_|jS)zReturn a new unique key.�)r)rrrr�_getkeyFszAbstractConnectionPool._getkeycCs�|jrtd��|dkr|��}||jkr2|j|S|jr^|j��|j|<}||jt|�<|St|j�|j	krvtd��|�
|�SdS)z9Get a free connection and assign it to 'key' if not None.zconnection pool is closedNzconnection pool exhausted)r
rr!rr�poprr�lenrr)rrrrrr�_getconnKs

zAbstractConnectionPool._getconnFcCs�|jrtd��|dkr6|j�t|��}|dkr6td��t|j�|jkr�|s�|js�|jj	}|t
jkrl|��q�|t
j
kr�|��|j�|�q�|j�|�n|��|jr�||jkr�|j|=|jt|�=dS)zPut away a connection.zconnection pool is closedNz trying to put unkeyed connection)r
rr�getrr#rr�infoZtransaction_status�_extZTRANSACTION_STATUS_UNKNOWN�closeZTRANSACTION_STATUS_IDLEZrollbackrr)rrrr(�statusrrr�_putconn^s&


zAbstractConnectionPool._putconnc	CsX|jrtd��x>|jt|j���D]&}y|��Wq$tk
rHYq$Xq$Wd|_dS)z�Close all connections.

        Note that this can lead to some code fail badly when trying to use
        an already closed connection. If you call .closeall() make sure
        your code can deal with it.
        zconnection pool is closedTN)r
rr�listr�valuesr(�	Exception)rrrrr�	_closeall�s
z AbstractConnectionPool._closeall)N)N)NF)
rrr�__doc__rrr!r$r*r.rrrrr	#s



#r	c@s"eZdZdZejZejZej	Z
dS)�SimpleConnectionPoolz@A connection pool that can't be shared across different threads.N)rrrr/r	r$�getconnr*�putconnr.�closeallrrrrr0�sr0c@s4eZdZdZdd�Zddd�Zd
dd	�Zd
d�ZdS)�ThreadedConnectionPoolz7A connection pool that works with the threading module.cOs,ddl}tj|||f|�|�|��|_dS)zInitialize the threading lock.rN)�	threadingr	r�Lock�_lock)rrrrrr5rrrr�szThreadedConnectionPool.__init__NcCs&|j��z
|�|�S|j��XdS)z9Get a free connection and assign it to 'key' if not None.N)r7�acquirer$�release)rrrrrr1�s

zThreadedConnectionPool.getconnFcCs.|j��z|�|||�Wd|j��XdS)zPut away an unused connection.N)r7r8r*r9)rrrr(rrrr2�s
zThreadedConnectionPool.putconncCs(|j��z|��Wd|j��XdS)z6Close all connections (even the one currently in use.)N)r7r8r.r9)rrrrr3�s
zThreadedConnectionPool.closeall)N)NNF)rrrr/rr1r2r3rrrrr4�s


r4)
r/rrr'�Errorr�objectr	r0r4rrrr�<module>so

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
25 Jan 2024 4.26 PM
root / 996
0755
__init__.cpython-37.opt-1.pyc
3.306 KB
5 Apr 2023 3.15 PM
root / 996
0644
__init__.cpython-37.pyc
3.306 KB
5 Apr 2023 3.15 PM
root / 996
0644
_ipaddress.cpython-37.opt-1.pyc
1.989 KB
5 Apr 2023 3.15 PM
root / 996
0644
_ipaddress.cpython-37.pyc
1.989 KB
5 Apr 2023 3.15 PM
root / 996
0644
_json.cpython-37.opt-1.pyc
6.121 KB
5 Apr 2023 3.15 PM
root / 996
0644
_json.cpython-37.pyc
6.121 KB
5 Apr 2023 3.15 PM
root / 996
0644
_lru_cache.cpython-37.opt-1.pyc
2.627 KB
5 Apr 2023 3.15 PM
root / 996
0644
_lru_cache.cpython-37.pyc
2.627 KB
5 Apr 2023 3.15 PM
root / 996
0644
_range.cpython-37.opt-1.pyc
13.922 KB
5 Apr 2023 3.15 PM
root / 996
0644
_range.cpython-37.pyc
13.922 KB
5 Apr 2023 3.15 PM
root / 996
0644
compat.cpython-37.opt-1.pyc
0.42 KB
5 Apr 2023 3.15 PM
root / 996
0644
compat.cpython-37.pyc
0.42 KB
5 Apr 2023 3.15 PM
root / 996
0644
errorcodes.cpython-37.opt-1.pyc
12.22 KB
5 Apr 2023 3.15 PM
root / 996
0644
errorcodes.cpython-37.pyc
12.22 KB
5 Apr 2023 3.15 PM
root / 996
0644
errors.cpython-37.opt-1.pyc
0.47 KB
5 Apr 2023 3.15 PM
root / 996
0644
errors.cpython-37.pyc
0.47 KB
5 Apr 2023 3.15 PM
root / 996
0644
extensions.cpython-37.opt-1.pyc
6.363 KB
5 Apr 2023 3.15 PM
root / 996
0644
extensions.cpython-37.pyc
6.363 KB
5 Apr 2023 3.15 PM
root / 996
0644
extras.cpython-37.opt-1.pyc
41.788 KB
5 Apr 2023 3.15 PM
root / 996
0644
extras.cpython-37.pyc
41.788 KB
5 Apr 2023 3.15 PM
root / 996
0644
pool.cpython-37.opt-1.pyc
4.78 KB
5 Apr 2023 3.15 PM
root / 996
0644
pool.cpython-37.pyc
4.78 KB
5 Apr 2023 3.15 PM
root / 996
0644
sql.cpython-37.opt-1.pyc
14.683 KB
5 Apr 2023 3.15 PM
root / 996
0644
sql.cpython-37.pyc
14.683 KB
5 Apr 2023 3.15 PM
root / 996
0644
tz.cpython-37.opt-1.pyc
3.945 KB
5 Apr 2023 3.15 PM
root / 996
0644
tz.cpython-37.pyc
3.945 KB
5 Apr 2023 3.15 PM
root / 996
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF