You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of my work on ipfs/py-datastore I ended up creating two generic utilities that may be useful in the context of this repository as well:
TeeingReceive{Stream,Channel}: Wraps an existing trio.Receive{Stream,Channel} and forwards all data received by the wrapped source to an arbitrary number of additional Receive* consumers using an in-memory channel for each.
receive_{stream,channel}_from: Creates a trio.ReceiveStream from an arbitrary Python/bytes object, iterable or async iterable (returning trio.ReceiveStreams unchanged of course)
Do these sound appropriate for inclusion into this library?
The text was updated successfully, but these errors were encountered:
Happy to consider them. Is the implementation in a public repo already by any chance?
I don't have a sense for how general of a need these fill.
ntninja
changed the title
TeeReceive{Stream,Channel} and receive_{stream,channel}_from – relevant for this repo?TeeingReceive{Stream,Channel} and receive_{stream,channel}_from – relevant for this repo?
Feb 2, 2020
As part of my work on ipfs/py-datastore I ended up creating two generic utilities that may be useful in the context of this repository as well:
TeeingReceive{Stream,Channel}
: Wraps an existingtrio.Receive{Stream,Channel}
and forwards all data received by the wrapped source to an arbitrary number of additionalReceive*
consumers using an in-memory channel for each.receive_{stream,channel}_from
: Creates atrio.ReceiveStream
from an arbitrary Python/bytes object, iterable or async iterable (returningtrio.ReceiveStream
s unchanged of course)Do these sound appropriate for inclusion into this library?
The text was updated successfully, but these errors were encountered: