add channel.channel based on coros.queue(0) (temporarily for backward compatibility)
This commit is contained in:
15
eventlet/channel.py
Normal file
15
eventlet/channel.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
from eventlet import coros
|
||||||
|
|
||||||
|
class channel(coros.queue):
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
coros.queue.__init__(self, 0)
|
||||||
|
|
||||||
|
def receive(self):
|
||||||
|
return self.wait()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def balance(self):
|
||||||
|
return self.sem.balance
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user