uawdijnntqw1x1x1
IP : 3.135.247.24
Hostname : host45.registrar-servers.com
Kernel : Linux host45.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
.
/
..
/
lib64
/
pgsql
/
..
/
python3.8
/
multiprocessing
/
__pycache__
/
sharedctypes.cpython-38.pyc
/
/
U e5d��@sBddlZddlZddlmZddlmZddlmZmZejZ dddd d dgZ ejejej ejejejejejejejejejejejd�Zd d�Zdd�Zdd�Zddd�dd�Zddd�dd �Zdd �Zd&dd�Z dd�Z!dd�Z"dd�Z#dZ$iZ%e�&�Z'Gdd�de(�Z)Gd d!�d!e)�Z*Gd"d#�d#e)�Z+Gd$d%�d%e+�Z,dS)'�N�)�heap)�get_context)� reduction�assert_spawning�RawValue�RawArray�Value�Array�copy�synchronized)�c�u�b�B�h�H�i�I�l�L�q�Q�f�dcCs t�|�}t�|�}t||d�S�N)�ctypes�sizeofrZ BufferWrapper� rebuild_ctype)�type_�size�wrapper�r"�4/usr/lib64/python3.8/multiprocessing/sharedctypes.py� _new_value's r$cGs<t�||�}t|�}t�t�|�dt�|��|j|�|S)z> Returns a ctypes object allocated from shared memory r)�typecode_to_type�getr$r�memset� addressofr�__init__)�typecode_or_type�argsr�objr"r"r#r,s cCsjt�||�}t|t�rD||}t|�}t�t�|�dt�|��|S|t |�}t|�}|j |�|SdS)z= Returns a ctypes array allocated from shared memory rN)r%r&� isinstance�intr$rr'r(r�lenr))r*�size_or_initializerrr,�resultr"r"r#r6s T)�lock�ctxcGsXt|f|��}|dkr|S|dkr4|p*t�}|��}t|d�sJtd|��t|||d�S)z6 Return a synchronization wrapper for a Value F�TN�acquire�%r has no method 'acquire'�r3)rr�RLock�hasattr�AttributeErrorr)r*r2r3r+r,r"r"r#r Fs cCsTt||�}|dkr|S|dkr0|p&t�}|��}t|d�sFtd|��t|||d�S)z9 Return a synchronization wrapper for a RawArray Fr4r5r6r7)rrr8r9r:r)r*r0r2r3r,r"r"r#r Ts cCstt|��}|t�|�d<|S)Nr)r$�typerZpointer)r,Znew_objr"r"r#rbscCs�t|t�rtd��|pt�}t|tj�r4t|||�St|tj�rd|jtj krXt |||�St|||�St|�}zt |}WnRtk r�dd�|jD�}dd�|D�}d|j}t|tf|�}t |<YnX||||�SdS)Nzobject already synchronizedcSsg|]}|d�qS)rr")�.0Zfieldr"r"r#� <listcomp>vsz synchronized.<locals>.<listcomp>cSsi|]}|t|��qSr")� make_property)r<�namer"r"r#� <dictcomp>wsz synchronized.<locals>.<dictcomp>�Synchronized)r-�SynchronizedBase�AssertionErrorrrZ_SimpleCDatarAr �_type_�c_char�SynchronizedString�SynchronizedArrayr;�class_cache�KeyErrorZ_fields_�__name__)r,r2r3�clsZscls�namesrZ classnamer"r"r#rgs" cCs@t|�t|tj�r(t|j|j|jffStt|�|jdffSdSr) rr-rr rrD�_wrapperZ_length_r;)r,r"r"r#�reduce_ctype�srNcCs8|dk r||}t�|t�|��}|�|�}||_|Sr)�_ForkingPickler�registerrNZcreate_memoryviewZfrom_bufferrM)rr!ZlengthZbufr,r"r"r#r�s rcCsPz t|WStk rJi}tt|fd|�||t|<||YSXdS)N�)� prop_cacherI�exec�template)r?rr"r"r#r>�s r>z� def get%s(self): self.acquire() try: return self._obj.%s finally: self.release() def set%s(self, value): self.acquire() try: self._obj.%s = value finally: self.release() %s = property(get%s, set%s) c@sFeZdZddd�Zdd�Zdd�Zdd �Zd d�Zdd �Zdd�Z dS)rBNcCsB||_|r||_n|ptdd�}|��|_|jj|_|jj|_dS)NT)Zforce)�_obj�_lockrr8r5�release)�selfr,r2r3r"r"r#r)�s zSynchronizedBase.__init__cCs |j��Sr)rV� __enter__�rXr"r"r#rY�szSynchronizedBase.__enter__cGs|jj|�Sr)rV�__exit__)rXr+r"r"r#r[�szSynchronizedBase.__exit__cCst|�t|j|jffSr)rrrUrVrZr"r"r#� __reduce__�szSynchronizedBase.__reduce__cCs|jSr�rUrZr"r"r#�get_obj�szSynchronizedBase.get_objcCs|jSr)rVrZr"r"r#�get_lock�szSynchronizedBase.get_lockcCsdt|�j|jfS)Nz<%s wrapper for %s>)r;rJrUrZr"r"r#�__repr__�szSynchronizedBase.__repr__)NN) rJ� __module__�__qualname__r)rYr[r\r^r_r`r"r"r"r#rB�s rBc@seZdZed�ZdS)rA�valueN)rJrarbr>rcr"r"r"r#rA�srAc@s4eZdZdd�Zdd�Zdd�Zdd�Zd d �ZdS)rGcCs t|j�Sr)r/rUrZr"r"r#�__len__�szSynchronizedArray.__len__c Cs&|�|j|W5QR�SQRXdSrr])rXrr"r"r#�__getitem__�szSynchronizedArray.__getitem__c Cs|�||j|<W5QRXdSrr])rXrrcr"r"r#�__setitem__�szSynchronizedArray.__setitem__c Cs*|�|j||�W5QR�SQRXdSrr])rX�start�stopr"r"r#�__getslice__�szSynchronizedArray.__getslice__c Cs"|�||j||�<W5QRXdSrr])rXrgrh�valuesr"r"r#�__setslice__�szSynchronizedArray.__setslice__N)rJrarbrdrerfrirkr"r"r"r#rG�s rGc@seZdZed�Zed�ZdS)rFrc�rawN)rJrarbr>rcrlr"r"r"r#rF�srF)NN)-r�weakref�rr�contextrrZForkingPicklerrO�__all__rEZc_wcharZc_byteZc_ubyteZc_shortZc_ushortZc_intZc_uintZc_longZc_ulongZ c_longlongZc_ulonglongZc_floatZc_doubler%r$rrr r rrrNrr>rTrR�WeakKeyDictionaryrH�objectrBrArGrFr"r"r"r#�<module> sL�
/home/./../lib64/pgsql/../python3.8/multiprocessing/__pycache__/sharedctypes.cpython-38.pyc