o
    ÕÜg¼  ã                   @   sn   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 	d
¡ e
dƒ e 	d¡ 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   úd/var/www/html/api-tag/env/lib/python3.10/site-packages/greenlet/tests/fail_switch_three_greenlets.pyÚ	tracefunc   s
   r
   c                  C   s0   t dƒ dat ¡ j ¡ } t dƒ t d| ƒ d S )Nz	In g1_runTzReturn to g1_runzFrom parent)r   r   ÚgreenletÚ
getcurrentÚparentr   )Úfrom_parentr   r   r	   Úg1_run   s
   r   c                   C   s   t  ¡ j ¡  d S )N)r   r   r   r   r   r   r   r	   Úg2_run   s   r   é   zBack in mainé   )Ú__doc__r   Úg1r   r   r
   r   r   Úsettracer   r   r   r   r   r	   Ú<module>   s    



