
    @};d                          G d  d      Z y)c                   4    e Zd ZdZd Zd Zd Zd Zd Zd Z	y)		Coroutinea  A simple message-passing coroutine implementation. 
	Not thread- or signal-safe. 
	Usage:
		def my_iter (plexer, args):
			some_async_task (..., callback=plexer.send (tokens))
			yield None
			tokens, (data, ) = plexer.receive ()
			...
		Coroutine (my_iter, args).begin ()
	c                 .     || g| | _         d| _        y )NF)_continuation
_executing)selfiterargss      ;/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/rb/Coroutine.py__init__zCoroutine.__init__&   s    T)D)$$/    c                     | j                   sTd| _         	 	 t        | j                         | j                  r"t        | j                         | j                  r"d| _         y y # t        $ r Y w xY w# d| _         w xY w)NTF)r   nextr   _dataStopIterationr   s    r
   _resumezCoroutine._resume)   sr    	4?
	$

::
4 ::
 DO 
  
	
 DOs$   AA" "	A.+A1 -A..A1 1	A:c                     g | _         y N)r   r   s    r
   clearzCoroutine.clear5   s	    $*r   c                 D    | j                          | j                          y r   )r   r   r   s    r
   beginzCoroutine.begin7   s    **-,,/r   c                       fd}|S )Nc                  `    j                   j                  | f       j                          y r   )r   appendr   )r	   r   tokenss    r
   callbackz Coroutine.send.<locals>.callback;   s"    ::vtn%<<?r    )r   r   r   s   `` r
   sendzCoroutine.send:   s     
/r   c                 8    | j                   j                  d      S )N    )r   popr   s    r
   receivezCoroutine.receive?   s    		r   N)
__name__
__module____qualname____doc__r   r   r   r   r   r"   r   r   r
   r   r      s%    	
r   r   N)r   r   r   r
   <module>r'      s   6% %r   