$50 GRAYBYTE WORDPRESS FILE MANAGER $66

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/python39/lib64/python3.9/multiprocessing/__pycache__/

HOME
Current File : /opt/alt/python39/lib64/python3.9/multiprocessing/__pycache__//shared_memory.cpython-39.pyc
a

XC?h�G�@s�dZddgZddlmZddlZddlZddlZddlZddlZddl	Z	ej
dkr`ddlZdZnddl
Z
dZejejBZd	Zer�d
ZndZdd
�ZGdd�d�ZdZGdd�d�ZdS)z�Provides shared memory for direct access across processes.

The API of this package is currently provisional. Refer to the
documentation for details.
�SharedMemory�
ShareableList�)�partialN�ntFT�z/psm_Zwnsm_cCsBttt�d}|dks Jd��tt�|�}t|�tks>J�|S)z6Create a random filename for the shared memory object.�z_SHM_NAME_PREFIX too long)�_SHM_SAFE_NAME_LENGTH�len�_SHM_NAME_PREFIX�secretsZ	token_hex)�nbytes�name�r�B/opt/alt/python39/lib64/python3.9/multiprocessing/shared_memory.py�_make_filename's
rc@s�eZdZdZdZdZdZdZej	Z
dZer.dndZ
ddd	�Zd
d�Zdd
�Zdd�Zedd��Zedd��Zedd��Zdd�Zdd�ZdS)ra�Creates a new shared memory block or attaches to an existing
    shared memory block.

    Every shared memory block is assigned a unique name.  This enables
    one process to create a shared memory block with a particular name
    so that a different process can attach to that same shared memory
    block using that same name.

    As a resource for sharing data across processes, shared memory blocks
    may outlive the original process that created them.  When one process
    no longer needs access to a shared memory block that might still be
    needed by other processes, the close() method should be called.
    When a shared memory block is no longer needed by any process, the
    unlink() method should be called to ensure proper cleanup.N���i�TFrc
	Cs�|dkstd��|r0ttjB|_|dkr0td��|durL|jtj@sLtd��t�rD|dur�t�}ztj	||j|j
d�|_Wnty�YqZYn0||_
q�qZn.|jr�d|n|}tj	||j|j
d�|_||_
z<|r�|r�t�|j|�t�|j�}|j}t�|j|�|_Wnt�y&|���Yn0ddlm}||j
d	��n*|�r|du�rZt�n|}t�tjtjtj|d
?d@|d@|�}zjt��}|tjk�r�|du�r�ttj t�!tj �|tj��nWt�"|��qJtjd||d
�|_Wt�"|�nt�"|�0||_
�qn�qJnb||_
t�#tj$d|�}z"t�%|tj$ddd�}	Wt�"|�nt�"|�0t�&|	�}tjd||d
�|_||_'t(|j�|_)dS)Nrz!'size' must be a positive integerz4'size' must be a positive number different from zeroz&'name' can only be None if create=True)�mode�/�)�register�
shared_memory� l��r)ZtagnameF)*�
ValueError�_O_CREX�os�O_RDWR�_flags�O_EXCL�
_USE_POSIXr�_posixshmemZshm_open�_mode�_fd�FileExistsError�_name�_prepend_leading_slash�	ftruncate�fstat�st_size�mmap�_mmap�OSError�unlink�resource_trackerr�_winapiZCreateFileMappingZINVALID_HANDLE_VALUEZNULLZPAGE_READWRITEZGetLastErrorZERROR_ALREADY_EXISTS�errnoZEEXIST�strerrorZCloseHandleZOpenFileMappingZ
FILE_MAP_READZ
MapViewOfFileZVirtualQuerySize�_size�
memoryview�_buf)
�selfr
�create�sizeZstatsrZ	temp_nameZh_mapZlast_error_codeZp_bufrrr�__init__Js��
�
�

�
�
��
zSharedMemory.__init__cCs$z|��WntyYn0dS�N)�closer*�r3rrr�__del__�szSharedMemory.__del__cCs|j|jd|jffS)NF)�	__class__r
r5r9rrr�
__reduce__�s��zSharedMemory.__reduce__cCs|jj�d|j�d|j�d�S)N�(z, size=�))r;�__name__r
r5r9rrr�__repr__�szSharedMemory.__repr__cCs|jS)z4A memoryview of contents of the shared memory block.)r2r9rrr�buf�szSharedMemory.bufcCs.|j}tr*|jr*|j�d�r*|jdd�}|S)z4Unique name that identifies the shared memory block.rrN)r#rr$�
startswith)r3Z
reported_namerrrr
�s

zSharedMemory.namecCs|jS)zSize in bytes.)r0r9rrrr5�szSharedMemory.sizecCsX|jdur|j��d|_|jdur4|j��d|_trT|jdkrTt�|j�d|_dS)zkCloses access to the shared memory from this instance but does
        not destroy the shared memory block.Nrr)r2�releaser)r8rr!rr9rrrr8�s



zSharedMemory.closecCs2tr.|jr.ddlm}t�|j�||jd�dS)z�Requests that the underlying shared memory block be destroyed.

        In order to ensure proper cleanup of resources, unlink should be
        called once (and only once) across all processes which have access
        to the shared memory block.r)�
unregisterrN)rr#r,rDrZ
shm_unlink)r3rDrrrr+�s
zSharedMemory.unlink)NFr)r?�
__module__�__qualname__�__doc__r#r!r)r2rrrr rr$r6r:r<r@�propertyrAr
r5r8r+rrrrr1s(
l




�utf8c@seZdZdZedededededdj	diZ
dZd	d
�dd
�dd
�d
d
�d�Ze
dd��Zd6dd�dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zed$d%��Zed&d'��Zed(d)��Zed*d+��Zed,d-��Zed.d/��Zed0d1��Zd2d3�Z d4d5�Z!e"e#j$�Z%dS)7ra�Pattern for a mutable list-like object shareable via a shared
    memory block.  It differs from the built-in list type in that these
    lists can not change their overall length (i.e. no append, insert,
    etc.)

    Because values are packed into a memoryview as bytes, the struct
    packing format for any storable value must require no more than 8
    characters to describe its format.�q�dzxxxxxxx?z%dsNzxxxxxx?x�cCs|Sr7r��valuerrr�<lambda>�zShareableList.<lambda>cCs|�d��t�S�N�)�rstrip�decode�	_encodingrMrrrrOrPcCs
|�d�SrQ)rSrMrrrrOrPcCsdSr7r)Z_valuerrrrOrP)rrr�cCs:t|ttdjf�sdSt|t�r$dSt|t�r2dSdSdS)z�Used in concert with _back_transforms_mapping to convert values
        into the appropriate Python objects when retrieving them from
        the list as well as when storing them.NrrrrV)�
isinstance�str�bytesr;rMrrr�_extract_recreation_codes

z&ShareableList._extract_recreation_code�r
cs�|dus|dur�|pd}�fdd�|D�}t|��_tdd�|D���jksPJ�d}dg�_|D]6}||ddkrx�jnt|dd��7}�j�|�q`�fd	d�|D�}t�d
�j	d�
|��j�j�}t
|d|d
��_n
t
|��_|du�r�t�tjd
�j	�jjd�jg�j�R�tjd�
|��jj�jg�fdd�|D��R�tj�j�jj�jg�fdd�|D��R�tj�j�jj�jg|�R�n$t���_tt��j	�jjd���_dS)NrcsPg|]H}t|ttf�s$�jt|�n&�jt|��jt|��jdf�qS)r)rWrXrY�_types_mapping�type�
_alignmentr	��.0�itemr9rr�
<listcomp>+s���z*ShareableList.__init__.<locals>.<listcomp>css|]}t|�dkVqdS)rLN)r	)r`�fmtrrr�	<genexpr>4rPz)ShareableList.__init__.<locals>.<genexpr>rr�scsg|]}��|��qSr)rZr_r9rrrb=srJ�T)r4r5c3s&|]}t|t�r|���n|VqdSr7)rWrX�encode�r`�v��_encrrrdXrPc3s|]}|���VqdSr7)rgrhrjrrrd^rPrL)r	�	_list_len�sum�_allocated_offsetsr^�int�append�structZcalcsize�_format_size_metainfo�join�_format_packing_metainfo�_format_back_transform_codesr�shmrU�	pack_intorA�_offset_data_start�_offset_packing_formats�_offset_back_transform_codes�list�unpack_from)r3Zsequencer
Z_formats�offsetrcZ_recreation_codesZrequested_sizer)rkr3rr6(s�
�
&
�����

��������

��zShareableList.__init__cCsj|dkr|n||j}||jks*|jdkr2td��t�d|jj|j|d�d}|�d�}|�t	�}|S)z>Gets the packing format for a single value stored in the list.r� Requested position out of range.�8srLrR)
rl�
IndexErrorrqr|rvrAryrSrTrU)r3�positionrirc�
fmt_as_strrrr�_get_packing_formatqs��

z!ShareableList._get_packing_formatcCsF||jks|jdkrtd��t�d|jj|j|�d}|j|}|S)z9Gets the back transformation function for a single value.rr~�b)rlr�rqr|rvrArz�_back_transforms_mapping)r3r��transform_codeZtransform_functionrrr�_get_back_transform�s��
z!ShareableList._get_back_transformcCsh||jks|jdkrtd��t�d|jj|j|d|�t��|�	|�}t�d|jj|j
||�dS)zvSets the packing format and back transformation code for a
        single value in the list at the specified position.rr~rrLr�N)rlr�rqrwrvrAryrgrUrZrz)r3r�r�rNr�rrr�!_set_packing_format_and_transform�s�
�z/ShareableList._set_packing_format_and_transformcCsv|dkr|n||j}z.|j|j|}t�|�|�|jj|�\}Wnty^td��Yn0|�	|�}||�}|S)Nrzindex out of range)
rlrxrnrqr|r�rvrAr�r�)r3r�r}riZback_transformrrr�__getitem__�s�

zShareableList.__getitem__c	Cs�|dkr|n||j}z"|j|}|j|}|�|�}WntyRtd��Yn0t|ttf�sv|jt	|�}|}n`|j|d|}t|t�r�|�
t�n|}t|�|kr�t
d��|ddkr�|}n|jt|f}|�|||�t�||jj||�dS)Nrzassignment index out of rangerz(bytes/str item exceeds available storagerre)rlrnrxr�r�rWrXrYr\r]rgrUr	rr�rqrwrvrA)	r3r�rNZitem_offsetr}Zcurrent_formatZ
new_formatZ
encoded_valueZallocated_lengthrrr�__setitem__�s8

����zShareableList.__setitem__cCst|j|jjd�dfS)Nr[r)rr;rvr
r9rrrr<�szShareableList.__reduce__cCst�d|jjd�dS)NrJr)rqr|rvrAr9rrr�__len__�szShareableList.__len__cCs"|jj�dt|��d|jj�d�S)Nr=z, name=r>)r;r?r{rvr
r9rrrr@�szShareableList.__repr__csd��fdd�t�j�D��S)z=The struct packing format used by all currently stored items.rfc3s|]}��|�VqdSr7)r�)r`�ir9rrrd�sz'ShareableList.format.<locals>.<genexpr>)rs�rangerlr9rr9r�format�s�zShareableList.formatcCsd|jdS)z>The struct packing format used for the items' storage offsets.rJr�rlr9rrrrr�sz#ShareableList._format_size_metainfocCs
d|jS)z>The struct packing format used for the items' packing formats.rr�r9rrrrt�sz&ShareableList._format_packing_metainfocCs
d|jS)z>The struct packing format used for the items' back transforms.r�r�r9rrrru�sz*ShareableList._format_back_transform_codescCs|jddS)NrrLr�r9rrrrx�sz ShareableList._offset_data_startcCs|j|jdS)Nr)rxrnr9rrrry�sz%ShareableList._offset_packing_formatscCs|j|jdS)NrL)ryrlr9rrrrzsz*ShareableList._offset_back_transform_codescst�fdd�|D��S)zCL.count(value) -> integer -- return number of occurrences of value.c3s|]}�|kVqdSr7r)r`�entryrMrrrdrPz&ShareableList.count.<locals>.<genexpr>)rm)r3rNrrMr�countszShareableList.countcCs4t|�D]\}}||kr|Sqt|�d���dS)zpL.index(value) -> integer -- return first index of value.
        Raises ValueError if the value is not present.z not in this containerN)�	enumerater)r3rNr�r�rrr�index
s
zShareableList.index)N)&r?rErFrGro�float�boolrXrYr;r\r^r��staticmethodrZr6r�r�r�r�r�r<r�r@rHr�rrrtrurxryrzr�r��classmethod�types�GenericAlias�__class_getitem__rrrrr�sT��

I!







)rG�__all__�	functoolsrr(rr.rqrr�r
r-rr�O_CREATrrrr
rrrUrrrrr�<module>s.

E


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
22 Jul 2025 8.33 AM
root / linksafe
0755
__init__.cpython-39.opt-1.pyc
0.651 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
__init__.cpython-39.opt-2.pyc
0.651 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
__init__.cpython-39.pyc
0.651 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
connection.cpython-39.opt-1.pyc
24.794 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
connection.cpython-39.opt-2.pyc
22.842 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
connection.cpython-39.pyc
24.996 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
context.cpython-39.opt-1.pyc
12.728 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
context.cpython-39.opt-2.pyc
11.302 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
context.cpython-39.pyc
12.728 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
forkserver.cpython-39.opt-1.pyc
8.188 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
forkserver.cpython-39.opt-2.pyc
7.419 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
forkserver.cpython-39.pyc
8.232 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
heap.cpython-39.opt-1.pyc
7.459 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
heap.cpython-39.opt-2.pyc
7.283 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
heap.cpython-39.pyc
7.469 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
managers.cpython-39.opt-1.pyc
39.771 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
managers.cpython-39.opt-2.pyc
35.887 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
managers.cpython-39.pyc
39.962 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
pool.cpython-39.opt-1.pyc
24.516 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
pool.cpython-39.opt-2.pyc
22.691 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
pool.cpython-39.pyc
24.562 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
popen_fork.cpython-39.opt-1.pyc
2.466 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
popen_fork.cpython-39.opt-2.pyc
2.466 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
popen_fork.cpython-39.pyc
2.466 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
popen_forkserver.cpython-39.opt-1.pyc
2.4 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
popen_forkserver.cpython-39.opt-2.pyc
2.4 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
popen_forkserver.cpython-39.pyc
2.4 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
popen_spawn_posix.cpython-39.opt-1.pyc
2.306 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
popen_spawn_posix.cpython-39.opt-2.pyc
2.306 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
popen_spawn_posix.cpython-39.pyc
2.306 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
popen_spawn_win32.cpython-39.opt-1.pyc
3.368 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
popen_spawn_win32.cpython-39.opt-2.pyc
3.289 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
popen_spawn_win32.cpython-39.pyc
3.389 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
process.cpython-39.opt-1.pyc
10.169 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
process.cpython-39.opt-2.pyc
8.755 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
process.cpython-39.pyc
10.764 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
queues.cpython-39.opt-1.pyc
9.893 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
queues.cpython-39.opt-2.pyc
9.742 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
queues.cpython-39.pyc
9.95 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
reduction.cpython-39.opt-1.pyc
8.104 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
reduction.cpython-39.opt-2.pyc
7.381 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
reduction.cpython-39.pyc
8.104 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
resource_sharer.cpython-39.opt-1.pyc
5.131 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
resource_sharer.cpython-39.opt-2.pyc
4.721 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
resource_sharer.cpython-39.pyc
5.173 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
resource_tracker.cpython-39.opt-1.pyc
5.274 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
resource_tracker.cpython-39.opt-2.pyc
4.923 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
resource_tracker.cpython-39.pyc
5.342 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
shared_memory.cpython-39.opt-1.pyc
13.911 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
shared_memory.cpython-39.opt-2.pyc
11.243 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
shared_memory.cpython-39.pyc
14.116 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
sharedctypes.cpython-39.opt-1.pyc
6.896 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
sharedctypes.cpython-39.opt-2.pyc
6.638 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
sharedctypes.cpython-39.pyc
6.943 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
spawn.cpython-39.opt-1.pyc
6.534 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
spawn.cpython-39.opt-2.pyc
6.068 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
spawn.cpython-39.pyc
6.576 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
synchronize.cpython-39.opt-1.pyc
10.84 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
synchronize.cpython-39.opt-2.pyc
10.84 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
synchronize.cpython-39.pyc
11.134 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
util.cpython-39.opt-1.pyc
11.214 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
util.cpython-39.opt-2.pyc
10.413 KB
19 Jun 2025 12.11 PM
root / linksafe
0644
util.cpython-39.pyc
11.249 KB
19 Jun 2025 12.11 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF