import * as tracing_1 from "../../Tracing";
const fileName_1 = "(@effect-ts/system): _src/Stream/Stream/fromChunkHubWithShutdown.ts";
import * as H from "../../Hub";
import { ensuringFirst_ } from "./ensuringFirst";
import { fromChunkHub } from "./fromChunkHub";
/**
 * Creates a stream from a `Hub` of values. The hub will be shutdown once the stream is closed.
 */

export function fromChunkHubWithShutdown(hub) {
  return ensuringFirst_(fromChunkHub(hub), H.shutdown(hub));
}
//# sourceMappingURL=fromChunkHubWithShutdown.js.map