Managing Concurrent and Blocking Async Tasks in Effect

hey, i’m working on an issue where i have a bunch of different async tasks going on

let’s say we have tasks types A and B. tasks of type A can be executed in parallel with one another but block tasks of type B. tasks of type B must be executed in series and block tasks of type A.

my mental model is a queue feeding into a funnel where the funnel is barely wide enough to fit one task B and nothing else, but task A is small enough that any number can flow through it at once

can anyone recommend a concept in Effect for dealing with this sort of thing?
Was this page helpful?