Code:
import gevent
import time
def func(a, t):
time.sleep(t)
print "got here", a
gevent.spawn(func, 'a', 4)
gevent.spawn(func, 'b', 0).join()
time.sleep(3)
print "exit"
Output:
got here a
got here b
exit
Expectation:
I never join on the first greenlet, so I expect that it will never execute; or, given the long sleep(), it should complete after the second greenlet.
Context:
I would like to be able to fire off a "throwaway" greenlet that populates a cache which I never join on and I never want to block to wait for the result of.