Skip to content

Commit

Permalink
Comment out MsgStream for now
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Apr 28, 2021
1 parent b1f657e commit fc36e73
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions tractor/_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def stream(func):
params = sig.parameters
if 'stream' not in params and 'ctx' in params:
warnings.warn(
"`@tractr.stream decorated funcs should now declare a `stream` "
"`@tractor.stream decorated funcs should now declare a `stream` "
" arg, `ctx` is now designated for use with @tractor.context",
DeprecationWarning,
stacklevel=2,
Expand Down Expand Up @@ -141,7 +141,6 @@ def __init__(
self._ctx = ctx
self._rx_chan = rx_chan
self._portal = portal
# self._chan = portal.channel
self._shielded = False

# delegate directly to underlying mem channel
Expand All @@ -152,7 +151,6 @@ async def receive(self):
try:
msg = await self._rx_chan.receive()
return msg['yield']
# return msg['yield']

except KeyError:
# internal error should never get here
Expand Down Expand Up @@ -249,14 +247,14 @@ async def aclose(self):
# )


class MsgStream(ReceiveMsgStream, trio.abc.Channel):
"""
Bidirectional message stream for use within an inter-actor actor
``Context```.
# class MsgStream(ReceiveMsgStream, trio.abc.Channel):
# """
# Bidirectional message stream for use within an inter-actor actor
# ``Context```.

"""
async def send(
self,
data: Any
) -> None:
await self._ctx.chan.send({'yield': data, 'cid': self._ctx.cid})
# """
# async def send(
# self,
# data: Any
# ) -> None:
# await self._ctx.chan.send({'yield': data, 'cid': self._ctx.cid})

0 comments on commit fc36e73

Please sign in to comment.