Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Are gevent.spawn_link_exception and friends gone in gevent v1.0 permanently?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
vitaly  
View profile  
 More options May 15 2012, 8:26 pm
From: vitaly <vitaly.krugl.nume...@gmail.com>
Date: Tue, 15 May 2012 17:26:37 -0700 (PDT)
Local: Tues, May 15 2012 8:26 pm
Subject: Are gevent.spawn_link_exception and friends gone in gevent v1.0 permanently?
I tried to switch my app from gevent 0.13.x to v1.0b2 and found a few
things to be missing:

gevent.spawn_link_exception
gevent.greenlet.LinkedFailed and friends

Also, Greenlet.link_exception(self, receiver=None,
SpawnedLink=FailureSpawnedLink) provides a default value for receiver,
but raises an exception if called without a receiver:


/Users/vkruglikov/Packages/gevent-1.0b2/gevent-1.0b2/build/
lib.macosx-10.7-intel-2.6/gevent/greenlet.pyc in __init__(self,
callback)
     20     def __init__(self, callback):
     21         if not callable(callback):
---> 22             raise TypeError("Expected callable: %r" %
(callback, ))
     23         self.callback = callback
     24
<<

Thank you,
Vitaly


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Denis Bilenko  
View profile  
 More options May 16 2012, 5:19 am
From: Denis Bilenko <denis.bile...@gmail.com>
Date: Wed, 16 May 2012 13:19:12 +0400
Local: Wed, May 16 2012 5:19 am
Subject: Re: [gevent] Are gevent.spawn_link_exception and friends gone in gevent v1.0 permanently?

On Wed, May 16, 2012 at 4:26 AM, vitaly <vitaly.krugl.nume...@gmail.com> wrote:
> I tried to switch my app from gevent 0.13.x to v1.0b2 and found a few
> things to be missing:

> gevent.spawn_link_exception
> gevent.greenlet.LinkedFailed and friends

Yes, "linking to greenlet" feature was removed in 1.0.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Johan Rydberg  
View profile  
 More options May 16 2012, 12:47 pm
From: Johan Rydberg <johan.rydb...@gmail.com>
Date: Wed, 16 May 2012 18:47:21 +0200
Local: Wed, May 16 2012 12:47 pm
Subject: Re: [gevent] Are gevent.spawn_link_exception and friends gone in gevent v1.0 permanently?
Is there a way to accomplish the same functionality, without
subclassing Greenlet?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Denis Bilenko  
View profile  
 More options May 16 2012, 1:09 pm
From: Denis Bilenko <denis.bile...@gmail.com>
Date: Wed, 16 May 2012 21:09:34 +0400
Local: Wed, May 16 2012 1:09 pm
Subject: Re: [gevent] Are gevent.spawn_link_exception and friends gone in gevent v1.0 permanently?

On Wed, May 16, 2012 at 8:47 PM, Johan Rydberg <johan.rydb...@gmail.com> wrote:
> Is there a way to accomplish the same functionality, without
> subclassing Greenlet?

Sure, just pass a callable to link() that will kill() your greenlet.

one_greenlet.link(lambda *args:
another_greenlet.kill(Exception('one_greenlet is dead'))

However, using kill() and asynchronous exceptions in general is not
recommended. Best to structure your program differently so you don't
need it.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »