est / winpdb

Automatically exported from code.google.com/p/winpdb
0 stars 1 forks source link

gevent causes problems to debug #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Using this code from the gevent examples:

urls = ['http://www.google.com', 'http://www.yandex.ru', 
'http://www.python.org']

import gevent
from gevent import monkey

# patches stdlib (including socket and ssl modules) to cooperate with other 
greenlets
monkey.patch_all()

import urllib2

def print_head(url):
    print 'Starting %s' % url
    data = urllib2.urlopen(url).read()
    print '%s: %s bytes: %r' % (url, len(data), data[:50])

jobs = [gevent.spawn(print_head, url) for url in urls]

gevent.joinall(jobs)

What do you see instead?

It reports this error when run from rpdb2:

NotImplementedError: gevent is only usable from a single thread

Is there a way to get around this issue?

Regards
Aaron

Original issue reported on code.google.com by agale031...@gmail.com on 21 Oct 2010 at 6:58

GoogleCodeExporter commented 9 years ago
I actually integrated gevent into my pyramid app (pylons). I am getting the 
same error when I send requests from the browser. It seems like gevent should 
only be used from a single thread. What is workaround for this?

Original comment by raviteja...@gmail.com on 20 Jun 2011 at 8:55

GoogleCodeExporter commented 9 years ago
I have similar error in my scripts.

Original comment by Alexandr...@gmail.com on 7 Aug 2011 at 1:14