o
    ÕÜg1  ã                   @   sj   d Z ddlZdZdZdadd„ Zdd„ Zdd	„ Ze e¡ e e¡Ze e¡Ze 	¡  e
d
ƒ e 	¡  dS )z 
Uses a trace function to switch greenlets at unexpected times.

In the trace function, we switch from the current greenlet to another
greenlet, which switches
é    NFc                  G   s4   t dg| ¢R Ž  trdat ¡  t dg| ¢R Ž  d S )NÚTRACEFz	LEAVE TRACE)ÚprintÚswitch_to_g2Úg2Úswitch)Úargs© r   úb/var/www/html/api-tag/env/lib/python3.10/site-packages/greenlet/tests/fail_switch_two_greenlets.pyÚ	tracefunc   s
   r
   c                   C   s.   t dƒ dat ¡ j ¡  t dƒ t dƒ d S )Nz	In g1_runTzReturn to g1_runzFalling off end of g1_run)r   r   ÚgreenletÚ
getcurrentÚparentr   r   r   r   r	   Úg1_run   s
   r   c                   C   s   t  ¡  tdƒ d S )NzFalling off end of g2)Úg1r   r   r   r   r   r	   Úg2_run   s   r   zFalling off end of main)Ú__doc__r   r   r   r   r
   r   r   Úsettracer   r   r   r   r   r	   Ú<module>   s    


