Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gevent.queue.Queue.peek ValueError #647

Closed
kchen opened this issue Sep 4, 2015 · 1 comment
Closed

gevent.queue.Queue.peek ValueError #647

kchen opened this issue Sep 4, 2015 · 1 comment
Labels
Type: Bug Identified as a bug; needs a code change to fix

Comments

@kchen
Copy link
Contributor

kchen commented Sep 4, 2015

The following code works in gevent 1.1b2, but not in 1.1b4:

import gevent.queue
q = gevent.queue.Queue()
g = gevent.spawn(q.peek)
g.start()
gevent.sleep(0)
q.put(1)
gevent.hub.get_hub().join()

In 1.1b4:

Traceback (most recent call last):
  File "/home/kechen/workspaces/foo/python-gevent/gevent-1.1b4/gevent/greenlet.py", line 522, in run
    result = self._run(*self.args, **self.kwargs)
  File "/home/kechen/workspaces/foo/python-gevent/gevent-1.1b4/gevent/queue.py", line 309, in peek
    self.getters.remove(waiter)
ValueError: deque.remove(x): x not in deque
<Greenlet at 0xf73247fc: <bound method Queue.peek of <Queue at 0xf7409e2c queue=deque([1])>>> failed with ValueError
@jamadden jamadden added the Type: Bug Identified as a bug; needs a code change to fix label Sep 4, 2015
@jamadden
Copy link
Member

jamadden commented Sep 4, 2015

Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Identified as a bug; needs a code change to fix
Projects
None yet
Development

No branches or pull requests

2 participants