Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 18 lines (14 sloc) 0.327 kB
from greenlet import greenlet
def test1():
print("test1 is switching to g2")
g2.switch()
print("test1 done")
def test2():
print("test2 switching to g1")
g1.switch()
print("test2 done")
g1 = greenlet(test1)
g2 = greenlet(test2)
print("main switching to g1")
g1.switch()
print("main done")
Jump to Line
Something went wrong with that request. Please try again.