Cory
Cory

Reputation: 15615

Is there a way to cancel gevent.spawn_later()?

If you call gevent.spawn_later(), is there a way to cancel this scheduled function before it occurs?

Upvotes: 5

Views: 1226

Answers (1)

Denis
Denis

Reputation: 3780

Yes, use kill() method.

g = gevent.spawn_later(5, function)
g.kill()

Upvotes: 7

Related Questions