
    +h                         d Z ddlZdZdZdad Zd Zd Z ej                  e        ej                  e      Z ej                  e      Zej                  d        e
d       ej                  d	       y)
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                  l    t        dg|   t        rdat        j                          t        dg|   y )NTRACEFz	LEAVE TRACE)printswitch_to_g2g2switch)argss    ]/var/www/html/venv/lib/python3.12/site-packages/greenlet/tests/fail_switch_three_greenlets.py	tracefuncr      s-    	'D
			/!D!    c                      t        d       dat        j                         j                  j                         } t        d       t        d|        y )Nz	In g1_runTzReturn to g1_runzFrom parent)r   r   greenlet
getcurrentparentr   )from_parents    r
   g1_runr      s?    	+L%%'..557K	
	-%r   c                  \    t        j                         j                  j                          y )N)r   r   r   r    r   r
   g2_runr      s      '')r      zBack in main   )__doc__r   g1r   r   r   r   r   settracer   r   r   r   r
   <module>r      s    		"&*   ) XvXv
 		! n  		!r   