Help Needed with `Stream.share` Operator PR: Inconsistent Test Suite Behavior

Could someone help me with my PR for Stream.share operator, please? I spent the whole day trying to figure out why this test suite doesn't work

https://github.com/Effect-TS/effect/pull/3080/files#diff-dcd9cb5291d91b74bc211b54f85f8e0ff1ea0c1d1a90000559e2903b80a83091R30-R61

The funny thing is that i can't even reproduce the behaviour out of this case.

If i replace
fiber ??= yield* Effect.forkScoped(runIntoPubSubScoped(upstream, connector))

With
fiber ??= yield* Effect.forkDaemon(runIntoPubSub(upstream, connector))


Everything starts working, so it makes me thing there is a sneaky bug somewhere in effect, because the logic seems to be pretty straightforward
Was this page helpful?