From: Jon Severinsson <j...@severinsson.net>

This matches the Python 3.x name.

Signed-off-by: Kenneth Graunke <kenn...@whitecape.org>
---
 framework/threadpool.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/framework/threadpool.py b/framework/threadpool.py
index 1b4c12c..1500a98 100644
--- a/framework/threadpool.py
+++ b/framework/threadpool.py
@@ -52,7 +52,7 @@ __license__ = "MIT license"
 # standard library modules
 import sys
 import threading
-import Queue
+import Queue as queue
 import traceback
 
 
@@ -122,7 +122,7 @@ class WorkerThread(threading.Thread):
         """Set up thread in daemonic mode and start it immediatedly.
 
         ``requests_queue`` and ``results_queue`` are instances of
-        ``Queue.Queue`` passed by the ``ThreadPool`` class when it creates a 
new
+        ``queue.Queue`` passed by the ``ThreadPool`` class when it creates a 
new
         worker thread.
 
         """
@@ -145,7 +145,7 @@ class WorkerThread(threading.Thread):
             # the while loop again, to give the thread a chance to exit.
             try:
                 request = self._requests_queue.get(True, self._poll_timeout)
-            except Queue.Empty:
+            except queue.Empty:
                 continue
             else:
                 if self._dismissed.isSet():
@@ -244,11 +244,11 @@ class ThreadPool:
             the possibilty of a deadlock, when the results queue is not pulled
             regularly and too many jobs are put in the work requests queue.
             To prevent this, always set ``timeout > 0`` when calling
-            ``ThreadPool.putRequest()`` and catch ``Queue.Full`` exceptions.
+            ``ThreadPool.putRequest()`` and catch ``queue.Full`` exceptions.
 
         """
-        self._requests_queue = Queue.Queue(q_size)
-        self._results_queue = Queue.Queue(resq_size)
+        self._requests_queue = queue.Queue(q_size)
+        self._results_queue = queue.Queue(resq_size)
         self.workers = []
         self.dismissedWorkers = []
         self.workRequests = {}
@@ -315,7 +315,7 @@ class ThreadPool:
                        (request.exception and request.exc_callback):
                     request.callback(request, result)
                 del self.workRequests[request.requestID]
-            except Queue.Empty:
+            except queue.Empty:
                 break
 
     def wait(self):
-- 
1.8.2.1

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to