HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib64/python3.6/site-packages/zmq/sugar/__pycache__/tracker.cpython-36.opt-1.pyc
3

VS�_��@s|dZddlZyddlmZWn$eefk
r@ddlmZYnXddlmZddl	m
Z
Gdd�de�Ze�Z
dd	gZdS)
z(Tracker for zero-copy messages with 0MQ.�N)�_Event)�Event)�NotDone)�Framec@s6eZdZdZdZdZdd�Zedd��Zddd	�Z	dS)�MessageTrackera�MessageTracker(*towatch)

    A class for tracking if 0MQ is done using one or more messages.

    When you send a 0MQ message, it is not sent immediately. The 0MQ IO thread
    sends the message at some later time. Often you want to know when 0MQ has
    actually sent the message though. This is complicated by the fact that
    a single 0MQ message can be sent multiple times using different sockets.
    This class allows you to track all of the 0MQ usages of a message.

    Parameters
    ----------
    towatch : Event, MessageTracker, Message instances.
        This objects to track. This class can track the low-level
        Events used by the Message class, other MessageTrackers or
        actual Messages.
    NcGs�t�|_t�|_xt|D]l}t|t�r2|jj|�qt|t�rJ|jj|�qt|t�rr|jsbt	d��|jj|j�qt
dt|���qWdS)a~MessageTracker(*towatch)

        Create a message tracker to track a set of mesages.

        Parameters
        ----------
        *towatch : tuple of Event, MessageTracker, Message instances.
            This list of objects to track. This class can track the low-level
            Events used by the Message class, other MessageTrackers or 
            actual Messages.
        zNot a tracked messagez(Require Events or Message Frames, not %sN)�set�events�peers�
isinstancer�addrrZtracker�
ValueError�	TypeError�type)�selfZtowatch�obj�r�/usr/lib64/python3.6/tracker.py�__init__'s



zMessageTracker.__init__cCs:x|jD]}|j�sdSqWx|jD]}|js$dSq$WdS)z9Is 0MQ completely done with the message(s) being tracked?FT)r�is_setr	�done)r�evtZpmrrrrAszMessageTracker.done�cCs�tj�}|dks|dkrd	}n|}d}xJ|jD]@}|dkr>t�|j|d�|j�sVt�tj�}|||8}|}q.Wx>|jD]4}|dkr�t�|j|d�tj�}|||8}|}qzWdS)
a�mt.wait(timeout=-1)

        Wait for 0MQ to be done with the message or until `timeout`.

        Parameters
        ----------
        timeout : float [default: -1, wait forever]
            Maximum time in (s) to wait before raising NotDone.

        Returns
        -------
        None
            if done before `timeout`
        
        Raises
        ------
        NotDone
            if `timeout` reached before I am done.
        Fri��)�timeoutNi�Qi�:	)�timerr�waitrr	)rrZticZ	remainingrrZtocZpeerrrrrLs*zMessageTracker.wait���)r)
�__name__�
__module__�__qualname__�__doc__rr	r�propertyrrrrrrrsr�_FINISHED_TRACKER)r!rZ	threadingrr�ImportError�AttributeErrorZ	zmq.errorrZzmq.backendr�objectrr#�__all__rrrr�<module>sf