Concurrency Issue with @effect-ts/core Library
Hello everyone, I'm facing a weird behavior when running some operations concurrently. In that case I'm using
I have a list of Effects that are run concurrently using
For some reason, it appears that sometimes not all operations
-
-
But
Also,
So my question is what could conceptually prevents/blocks
I'm aware that the Effect returned by
As a quick note there is normally I/O blocking operation done by
@effect-ts/core but I'm not able to reproduce the behavior when using a simpler version of my use case, so I know it's not a runtime bug. I have a list of Effects that are run concurrently using
collectAllPar and each Effect is raced with a dedicated timer (Effect that timeout after 5s) such as:For some reason, it appears that sometimes not all operations
someAsyncComputation are started, for example:-
someAsyncComputation1 triggered -
someAsyncComputation2 triggeredBut
someAsyncComputation3 is never started.Also,
someAsyncComputation are using another runtime instance created (only once) to run the Effects:So my question is what could conceptually prevents/blocks
someAsyncComputation to be started in that case?I'm aware that the Effect returned by
T.timeout waits for the underlying Effect to be fully interrupted before returning but in that case there is no blocking release action As a quick note there is normally I/O blocking operation done by
computation that could potentially block the event loop (from what I could see in the Azure SDK)