unbounded<T> static method
Implementation
static MpscChannel<T> unbounded<T>({
bool chunked = true,
String? metricsId,
}) {
final buf = chunked ? ChunkedBuffer<T>() : UnboundedBuffer<T>();
final core = StandardChannelCore<T>(
buf,
allowMultiSenders: true,
allowMultiReceivers: false,
metricsId: metricsId,
);
final tx = core.attachSender((c) =>
MpscSender<T>._(c.id, c.createRemotePort(), metricsId: c.metricsId));
final rx = core.attachReceiver((c) =>
MpscReceiver<T>._(c.id, c.createRemotePort(), metricsId: c.metricsId));
return (tx, rx);
}