Commit e371f455 authored by Denis Bilenko's avatar Denis Bilenko

greenlet: fix spawn_link* functions to work well with Greenlet's subclasses...

greenlet: fix spawn_link* functions to work well with Greenlet's subclasses (thanks to Marcus Cavanaugh)
parent 64efac0a
......@@ -256,20 +256,20 @@ class Greenlet(greenlet):
return g
@classmethod
def spawn_link(cls, function, *args, **kwargs):
g = cls.spawn(function, *args, **kwargs)
def spawn_link(cls, *args, **kwargs):
g = cls.spawn(*args, **kwargs)
g.link()
return g
@classmethod
def spawn_link_value(cls, function, *args, **kwargs):
g = cls.spawn(function, *args, **kwargs)
def spawn_link_value(cls, *args, **kwargs):
g = cls.spawn(*args, **kwargs)
g.link_value()
return g
@classmethod
def spawn_link_exception(cls, function, *args, **kwargs):
g = cls.spawn(function, *args, **kwargs)
def spawn_link_exception(cls, *args, **kwargs):
g = cls.spawn(*args, **kwargs)
g.link_exception()
return g
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment