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