blockQueue.py.svn-base 405 B

12345678910111213141516171819202122232425
  1. # coding=utf-8
  2. '''
  3. Created on 2016年6月17日
  4. @author: Pro1
  5. '''
  6. import queue
  7. '''
  8. 封装队列
  9. '''
  10. class BlockQueue():
  11. def __init__(self, maxSize=0):
  12. self.queue = queue.Queue(maxsize=maxSize)
  13. self.closed = False
  14. def getQueue(self):
  15. return self.queue
  16. def close(self):
  17. self.closed = True
  18. def isClose(self):
  19. return self.closed