0.1.11 #14

Merged
Thilawyn merged 318 commits from next into master 2025-05-19 14:01:41 +02:00
Showing only changes of commit 6bc07d5b2a - Show all commits

View File

@@ -0,0 +1,17 @@
import { Effect, Exit, PubSub, Scope, Stream } from "effect"
await Effect.gen(function*() {
const scope = yield* Scope.make()
const pubsub = yield* PubSub.unbounded<string>()
console.log(yield* PubSub.isShutdown(pubsub))
const stream = yield* Stream.fromPubSub(pubsub, { scoped: true, shutdown: true }).pipe(
Effect.provideService(Scope.Scope, scope)
)
yield* Scope.close(scope, Exit.void)
console.log(yield* PubSub.isShutdown(pubsub))
}).pipe(
Effect.runPromise,
)