forked from goodboy/tractor
Move broadcast channel parts into trionics
parent
680a841282
commit
4114eb1d25
|
@ -12,7 +12,7 @@ import pytest
|
||||||
import trio
|
import trio
|
||||||
from trio.lowlevel import current_task
|
from trio.lowlevel import current_task
|
||||||
import tractor
|
import tractor
|
||||||
from tractor._broadcast import broadcast_receiver, Lagged
|
from tractor.trionics import broadcast_receiver, Lagged
|
||||||
|
|
||||||
|
|
||||||
@tractor.context
|
@tractor.context
|
||||||
|
@ -432,7 +432,6 @@ def test_first_recver_is_cancelled():
|
||||||
tx, rx = trio.open_memory_channel(1)
|
tx, rx = trio.open_memory_channel(1)
|
||||||
brx = broadcast_receiver(rx, 1)
|
brx = broadcast_receiver(rx, 1)
|
||||||
cs = trio.CancelScope()
|
cs = trio.CancelScope()
|
||||||
sequence = list(range(3))
|
|
||||||
|
|
||||||
async def sub_and_recv():
|
async def sub_and_recv():
|
||||||
with cs:
|
with cs:
|
||||||
|
|
|
@ -19,8 +19,8 @@ import trio
|
||||||
from ._ipc import Channel
|
from ._ipc import Channel
|
||||||
from ._exceptions import unpack_error, ContextCancelled
|
from ._exceptions import unpack_error, ContextCancelled
|
||||||
from ._state import current_actor
|
from ._state import current_actor
|
||||||
from ._broadcast import broadcast_receiver, BroadcastReceiver
|
|
||||||
from .log import get_logger
|
from .log import get_logger
|
||||||
|
from .trionics import broadcast_receiver, BroadcastReceiver
|
||||||
|
|
||||||
|
|
||||||
log = get_logger(__name__)
|
log = get_logger(__name__)
|
||||||
|
|
|
@ -3,8 +3,11 @@ Sugary patterns for trio + tractor designs.
|
||||||
|
|
||||||
'''
|
'''
|
||||||
from ._mngrs import async_enter_all
|
from ._mngrs import async_enter_all
|
||||||
|
from ._broadcast import broadcast_receiver, BroadcastReceiver
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'async_enter_all',
|
'async_enter_all',
|
||||||
|
'broadcast_receiver',
|
||||||
|
'BroadcastReceiver',
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue