Break loop after result retreival
parent
a71a958f54
commit
33b0e36ad6
|
@ -286,7 +286,6 @@ class MsgStream(trio.abc.Channel):
|
||||||
@asynccontextmanager
|
@asynccontextmanager
|
||||||
async def subscribe(
|
async def subscribe(
|
||||||
self,
|
self,
|
||||||
|
|
||||||
) -> AsyncIterator[BroadcastReceiver]:
|
) -> AsyncIterator[BroadcastReceiver]:
|
||||||
'''
|
'''
|
||||||
Allocate and return a ``BroadcastReceiver`` which delegates
|
Allocate and return a ``BroadcastReceiver`` which delegates
|
||||||
|
@ -705,6 +704,7 @@ class Context:
|
||||||
result = consume(msg)
|
result = consume(msg)
|
||||||
if result:
|
if result:
|
||||||
self._result = result
|
self._result = result
|
||||||
|
break
|
||||||
|
|
||||||
if not self._result:
|
if not self._result:
|
||||||
while True:
|
while True:
|
||||||
|
|
Loading…
Reference in New Issue