403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/zmq/utils/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/zmq/utils/__pycache__/garbage.cpython-311.pyc
�

mc�c����dZddlZddlZddlZddlmZddlmZddlm	Z	m
Z
mZddlZedddg��Z
Gd	�d
e��ZGd�d��Ze��ZdS)
zcGarbage collection thread for representing zmq refcount of Python objects
used in zero-copy sends.
�N)�
namedtuple)�getpid)�Event�Lock�Thread�gcref�obj�eventc�(��eZdZdZ�fd�Zd�Z�xZS)�GarbageCollectorThreadz4Thread in which garbage collection actually happens.c���t�����||_d|_t	��|_t
��|_dS)NT)�super�__init__�gc�daemonr�pidr�ready)�selfr�	__class__s  ��3/usr/lib/python3/dist-packages/zmq/utils/garbage.pyrzGarbageCollectorThread.__init__sA���
���������������8�8����W�W��
�
�
�c��t�t��|jkr|j���dS	|jj�tj��}d|_	|�
|jj��|j���n#|j���wxYw	t�t��|jkrdS|���}|dkrnvt|��dkrdnd}tj||��d}|jj�|d��}|r |jr|j���~��|���dS)NrT�DIE��L�Q)rrr�setr�context�socket�zmq�PULL�linger�bind�url�recv�len�struct�unpack�refs�popr
�close)r�s�msg�fmt�key�tups      r�runzGarbageCollectorThread.runsO���>�V�X�X���1�1��J�N�N�����F�	����&�&�s�x�0�0�A��A�H�
�F�F�4�7�;�����J�N�N������D�J�N�N��������	��~����T�X�!5�!5����&�&�(�(�C��f�}�}���S���Q���#�#�C�C��-��S�)�)�!�,�C��'�,�"�"�3��-�-�C��
 �s�y�
 ��	�
�
�����	�	
���	�	�	�	�	s�AB$�$B?)�__name__�
__module__�__qualname__�__doc__rr1�
__classcell__�rs@rrrsM�������>�>������������rrc���eZdZdZdZdZdZdZd�fd�	Ze	d���Z
e
jd���Z
d�Zd�Z
d	�Zd
�Ze	d���Zd�Zd
�Zdd�Zd�Z�xZS)�GarbageCollectoraFPyZMQ Garbage Collector

    Used for representing the reference held by libzmq during zero-copy sends.
    This object holds a dictionary, keyed by Python id,
    of the Python objects whose memory are currently in use by zeromq.

    When zeromq is done with the memory, it sends a message on an inproc PUSH socket
    containing the packed size_t (32 or 64-bit unsigned int),
    which is the key in the dict.
    When the PULL socket in the gc thread receives that message,
    the reference is popped from the dict,
    and any tracker events that should be signaled fire.
    Nzinproc://pyzmq.gc.01c���t�����i|_d|_d|_||_t
��|_d|_d|_	d|_
tj|j
��dS)NF)rrr)r�thread�_contextr�_lock�
_stay_down�_push�_push_mutex�atexit�register�_atexit)rrrs  �rrzGarbageCollector.__init__Osn���
����������	���������
��V�V��
������
��������%�%�%�%�%rc���|j�Wtj�d��r ddlm}|���|_nt	j��|_|jS)N�geventr)�green)r<rr3�
startswithr rF�Context)rrFs  rrzGarbageCollector.context[s[���=� �� �+�+�H�5�5�
.�%�%�%�%�%�%� %�
�
����
�
� #��
�
��
��}�rc��|���r5|jrtjdt��|���||_dS)Nz(Replacing gc context while gc is running)�is_aliver)�warnings�warn�RuntimeWarning�stopr<)r�ctxs  rrzGarbageCollector.contextgsO���=�=�?�?�	��y�
��
�>�����
�I�I�K�K�K���
�
�
rc�<�d|_|���dS)zxatexit callback

        sets _stay_down flag so that gc doesn't try to start up again in other atexit handlers
        TN)r>rN�rs rrCzGarbageCollector._atexitqs��
����	�	�����rc�Z�|���sdS|���dS)z"stop the garbage-collection threadN)rJ�_stoprQs rrNzGarbageCollector.stopys(���}�}���	��F��
�
�����rc�p�d|_d|_d|_|j���d|_dS)zSClear state

        called after stop or when setting up a new subprocess
        N)r?r@r;r)�clearrrQs r�_clearzGarbageCollector._clears7��
��
��������	����������rc��|j�tj��}|�|j��|�d��|���|jr|j���|j	�
��|j���|���dS)Nr)
rrr �PUSH�connectr$�sendr+r?r;�join�termrV)r�pushs  rrSzGarbageCollector._stop�s����|�"�"�3�8�,�,�����T�X�����	�	�&�����
�
�����:�	��J�����������������������
�
�
�
�
rc��t|dd��rtd���|���r|j�H|j�tj��|_|j�|j	��|jS)z?The PUSH socket for use in the zmq message destructor callback.r>Fz'zmq gc socket requested during shutdown)
�getattr�RuntimeErrorrJr?rrr rXrYr$rQs r�_push_socketzGarbageCollector._push_socket�sx���4��u�-�-�	J��H�I�I�I��}�}���	)�$�*�"4���,�,�S�X�6�6�D�J��J���t�x�(�(�(��z�rc�4�|j�+|jt��kr|���t��|_i|_t|��|_|j���|jj���dS)z�Start a new garbage collection thread.

        Creates a new zmq Context used for garbage collection.
        Under most circumstances, this will only be called once per process.
        N)	r;rrrVr)r�startr�waitrQs rrczGarbageCollector.start�s}���;�"�t�x�6�8�8�';�';�
�K�K�M�M�M��8�8�����	�,�T�2�2��������������� � � � � rc��t�7t��|jks |j�|j���sdSdS)zsIs the garbage collection thread currently running?

        Includes checks for process shutdown or fork.
        NFT)rrr;rJrQs rrJzGarbageCollector.is_alive�sD��
�N��x�x�4�8�#�#��{�"��;�'�'�)�)�#��5��trc� �|���sP|jrdS|j5|���s|���ddd��n#1swxYwYt	||��}t|��}||j|<|S)z4store an object and (optionally) event for zero-copyrN)rJr>r=rcr�idr))rr	r
r0�theids     r�storezGarbageCollector.store�s����}�}���	!���
��q���
!�
!��}�}���!��J�J�L�L�L�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!����
!�
!�
!�
!��C������3������	�%���s�)A�A�!Ac��|���sdS	|���dS#t$r}|�d}~wwxYw�N)rJrN�	Exception)r�es  r�__del__zGarbageCollector.__del__�sQ���}�}���	��F�	��I�I�K�K�K�K�K���	�	�	��I�����	���s�.�
?�:�?rk)r2r3r4r5r)r<r=r$r�propertyr�setterrCrNrVrSrarcrJrirnr6r7s@rr9r9;s-����������D��H��E�
 �C�
&�
&�
&�
&�
&�
&��	�	��X�	�
�^����^��������	�	�	�	�	�	�����X��!�!�!� ������� ������rr9)r5rAr'rK�collectionsr�osr�	threadingrrrr rrr9r�rr�<module>rus������
�
�
�
�
�
�
�����"�"�"�"�"�"�������)�)�)�)�)�)�)�)�)�)�
�
�
�
��
�7�U�G�,�-�-��#�#�#�#�#�V�#�#�#�LX�X�X�X�X�X�X�X�v������r

Youez - 2016 - github.com/yon3zu
LinuXploit