mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Revert previous change. Wasn't ready yet.
This commit is contained in:
parent
e751c86dcb
commit
43b00da219
1 changed files with 1 additions and 12 deletions
|
@ -246,22 +246,11 @@ def QueueJoinTest(q):
|
||||||
q.put(i)
|
q.put(i)
|
||||||
q.join()
|
q.join()
|
||||||
verify(cum==sum(range(100)), "q.join() did not block until all tasks were done")
|
verify(cum==sum(range(100)), "q.join() did not block until all tasks were done")
|
||||||
q.join() # Make sure you can join more than once
|
|
||||||
|
|
||||||
def QueueTaskDoneTest(q)
|
|
||||||
try:
|
|
||||||
q.task_done()
|
|
||||||
except ValueError:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
raise TestFailed("Did not detect task count going negative")
|
|
||||||
|
|
||||||
def test():
|
def test():
|
||||||
q = Queue.Queue(20)
|
q = Queue.Queue()
|
||||||
QueueTaskDoneTest(q)
|
|
||||||
QueueJoinTest(q)
|
QueueJoinTest(q)
|
||||||
QueueJoinTest(q)
|
QueueJoinTest(q)
|
||||||
QueueTaskDoneTest(q)
|
|
||||||
|
|
||||||
q = Queue.Queue(QUEUE_SIZE)
|
q = Queue.Queue(QUEUE_SIZE)
|
||||||
# Do it a couple of times on the same queue
|
# Do it a couple of times on the same queue
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue