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

18 lines (14 sloc) 0.328 kB
from greenlet import greenlet
def one():
print("One is switching to two.")
g2.switch()
print("One is done.")
def two():
print("Two is switching to one.")
g1.switch()
print("Two is done.")
g1 = greenlet(one)
g2 = greenlet(two)
print("main switching to one.")
g1.switch()
print("main is done.")
Jump to Line
Something went wrong with that request. Please try again.