import * as T from "../../../../Effect";
import * as Q from "../../../../Queue";
import * as C from "../core";
import * as BufferSignal from "./_internal/bufferSignal";
/**
 * Allows a faster producer to progress independently of a slower consumer by buffering
 * up to `capacity` chunks in a dropping queue.
 */

export function bufferChunksDropping_(self, capacity) {
  const queue = T.toManagedRelease_(Q.makeDropping(capacity), Q.shutdown);
  return new C.Stream(BufferSignal.bufferSignal(queue, self.channel));
}
/**
 * Allows a faster producer to progress independently of a slower consumer by buffering
 * up to `capacity` chunks in a dropping queue.
 *
 * @ets_data_first bufferChunksDropping_
 */

export function bufferChunksDropping(capacity) {
  return self => bufferChunksDropping_(self, capacity);
}
//# sourceMappingURL=bufferChunksDropping.js.map