
    +h1                         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                           e
d       ej                          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_two_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Falling off end of g1_run)r   r   greenlet
getcurrentparentr    r   r
   g1_runr      s<    	+L  '')	
	
%&r   c                  B    t         j                          t        d       y )NzFalling off end of g2)g1r   r   r   r   r
   g2_runr      s    IIK	
!"r   zFalling off end of main)__doc__r   r   r   r   r   r   r   settracer   r   r   r   r
   <module>r      s~    		"'#   ) XvXv 		    		r   