parent
7a4bd92e33
commit
b3e8b2f6ab
|
@ -1,5 +1,8 @@
|
||||||
import threading, weakref, sys
|
import threading, weakref, sys
|
||||||
import Queue
|
try:
|
||||||
|
import Queue as queue
|
||||||
|
except ImportError:
|
||||||
|
import queue
|
||||||
if 'Message' not in globals():
|
if 'Message' not in globals():
|
||||||
from py.__.execnet.message import Message
|
from py.__.execnet.message import Message
|
||||||
|
|
||||||
|
@ -30,7 +33,7 @@ class Channel(object):
|
||||||
assert isinstance(id, int)
|
assert isinstance(id, int)
|
||||||
self.gateway = gateway
|
self.gateway = gateway
|
||||||
self.id = id
|
self.id = id
|
||||||
self._items = Queue.Queue()
|
self._items = queue.Queue()
|
||||||
self._closed = False
|
self._closed = False
|
||||||
self._receiveclosed = threading.Event()
|
self._receiveclosed = threading.Event()
|
||||||
self._remoteerrors = []
|
self._remoteerrors = []
|
||||||
|
@ -48,7 +51,7 @@ class Channel(object):
|
||||||
while 1:
|
while 1:
|
||||||
try:
|
try:
|
||||||
olditem = queue.get(block=False)
|
olditem = queue.get(block=False)
|
||||||
except Queue.Empty:
|
except queue.Empty:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
if olditem is ENDMARKER:
|
if olditem is ENDMARKER:
|
||||||
|
|
Loading…
Reference in New Issue