effect icon indicating copy to clipboard operation
effect copied to clipboard

From Discord: Effect.log only called once on SubscriptionRef

Open effect-bot opened this issue 2 years ago • 0 comments

Summary

In the conversation, the user initially asked why Effect.log was only being called once in their code. They were advised to fork the stream and use yieldNow to ensure that the subscription is running before continuing.

Later, the user encountered a strange issue where providing an unused layer (KeyValueStore.layerFileSystem) caused the behavior of the streams to change. It was noted that this should not be the case, but without a reproducible example, it was difficult to determine the exact cause.

Key takeaways:

  • When working with streams, it's important to fork them to ensure they run concurrently with other effects.
  • Providing an unused layer should not affect the behavior of streams, but it's difficult to determine the exact cause without a reproducible example.

Discord thread

https://discord.com/channels/795981131316985866/1164234386623963196

effect-bot avatar Oct 24 '23 13:10 effect-bot