import * as tracing_1 from "../../Tracing"
import * as tracing_2 from "../../Tracing"
const fileName_1 = "(@effect-ts/system): _src/Stream/Stream/fromChunkHub.ts"
import * as H from "../../Hub"
import { chain_ } from "./chain"
import { fromChunkQueue } from "./fromChunkQueue"
import { managed } from "./managed"
/**
 * Creates a stream from a `Hub`. The hub will be shutdown once the stream is closed.
 */

export function fromChunkHub(hub) {
  return chain_(managed(H.subscribe(hub)), (queue) => fromChunkQueue(queue))
}
//# sourceMappingURL=fromChunkHub.js.map
