summaryrefslogtreecommitdiff
path: root/tests/queue_test.py
Commit message (Collapse)AuthorAgeFilesLines
* pools: put to empty pool would block sometimesSam Merritt2018-07-031-0/+19
| | | | | | | | | | | | | | | | | | | If you have a pool with no free items, one greenthread blocked in pool.get(), and then you call pool.put(item), sometimes the put will block. This happens when the greenthread blocked in pool.get() has a pending timeout. The timeout's timer has fired, the call to throw() has been scheduled, but throw() has not actually run yet. In pool.put(), we see a waiting getter, so we do a blocking self.channel.put()... but when the getter runs, it unwinds its stack and does not take the item, leaving the caller of pool.put() blocked despite there being enough free space. This commit fixes that by (a) making LightQueue.put() and .get() work with 0-length queues, even with timeouts, and (b) checking for queue.Full in Pool.put() and handling it correctly. https://github.com/eventlet/eventlet/pull/495
* queue: empty except was catching too muchSergey Shepelev2017-04-261-9/+20
| | | | https://github.com/eventlet/eventlet/issues/407
* Reformat with autopep8Jakub Stasiak2014-10-111-1/+2
|
* PEP-8 fixesSergey Shepelev2014-08-271-26/+24
|
* tests: deprecated TestCase.assert_() -> assert keywordSergey Shepelev2014-07-161-6/+6
| | | | https://github.com/eventlet/eventlet/issues/101
* python3 compatibilitySergey Shepelev2014-04-241-27/+27
| | | | | | | | | | | | - __next__ for iterator interface - six.next() to get next item - list(dict.keys()) - popen2.popen4 -> subprocess - s2b -> b"..." literals - deprecated assertEquals -> assertEqual - hub_test test_fork using run_python - 1L -> 1 long literal - many PEP-8 fixes
* python3 compat fixesVictor Sergeyev2014-03-281-2/+2
| | | | https://github.com/eventlet/eventlet/pull/59
* queue: Make join not wait if there are no unfinished tasksJakub Stasiak2014-03-271-0/+4
| | | | This fixes GitHub issue #54
* python3 compat: 2to3: `except E as e:` syntaxDavanum Srinivas2013-12-031-1/+1
| | | | | | | First step to Python 3 compatibility "2to3 -w -f except ." See [1] [1] http://docs.python.org/2/library/2to3.html#fixers
* py3k - None is not comparable in 3.x, also queue.resize(None) was not waking ↵amajorek2010-03-071-0/+15
| | | | queued putters
* Bug 37: Implement queue resizingChris AtLee2010-02-221-0/+27
|
* Imported Timeout class from gevent, deprecated exc_after, replaced ↵Ryan Williams2010-02-151-1/+1
| | | | TimeoutError with Timeout (should be seamless).
* Doc updates, robustified multiple waiter queue tests.Ryan Williams2010-01-281-18/+5
|
* Added getting() and putting() methods to the Queue class, replaced ↵Ryan Williams2010-01-231-9/+5
| | | | coros.queue with queue.Queue in pools.py.
* Added eventlet.green.Queue, and refactored the queue module so that it's ↵Ryan Williams2010-01-231-1/+1
| | | | actually stdlib-compatible.
* Moved Event to its own module. More cycle-breaking!Ryan Williams2010-01-171-2/+2
|
* Fixed tests that were making assumptions about waiter order on queues.Ryan Williams2010-01-141-3/+3
|
* Added Queue class ported from gevent, with tests.Ryan Williams2010-01-141-0/+312