File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -100,13 +100,14 @@ def __aiter__(self) -> AsyncIterator[T]:
100
100
return self
101
101
102
102
async def __anext__ (self ) -> T :
103
- if self .done :
103
+ if self .done () :
104
104
raise StopAsyncIteration
105
105
self ._waiting_recievers += 1
106
106
try :
107
107
result = await self ._queue .get ()
108
108
if result is self .__flush :
109
109
raise StopAsyncIteration
110
+ return result
110
111
finally :
111
112
self ._waiting_recievers -= 1
112
113
self ._queue .task_done ()
@@ -151,7 +152,7 @@ async def send_from(
151
152
await self ._queue .put (item )
152
153
if close :
153
154
# Complete the closing process
154
- await self .close ()
155
+ self .close ()
155
156
156
157
async def send (self , item : T ):
157
158
"""
@@ -168,7 +169,7 @@ async def recieve(self) -> Optional[T]:
168
169
or None if the channel is closed before another item is sent.
169
170
:return: An item from the channel
170
171
"""
171
- if self .done :
172
+ if self .done () :
172
173
raise ChannelDone ("Cannot recieve from a closed channel" )
173
174
self ._waiting_recievers += 1
174
175
try :
You can’t perform that action at this time.
0 commit comments