From 6dd8693daae98b5d53628b39b37e7d1c518630ae Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 4 Aug 2004 04:50:59 +0000 Subject: [PATCH] No one's using this WorkQueue crap; I didn't really mean for it to be committed. --- src/structures.py | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/structures.py b/src/structures.py index 28995fbe7..c61aea970 100644 --- a/src/structures.py +++ b/src/structures.py @@ -349,29 +349,4 @@ class TwoWayDictionary(dict): dict.__delitem__(self, value) -class WorkQueue(object): - def __init__(self, q=None, n=1): - if q is None: - q = Queue.Queue() - self.q = q - self.numberOfThreads = n - self.threads = [] - for _ in xrange(n): - t = threading.Thread(target=self.target) - self.threads.append(t) - t.start() - - def target(self): - while 1: - f = self.q.get() - if f is None: - self.q.put(None) - break - else: - f() - - def enqueue(self, f): - self.q.put(f) - - # vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: