Trouble with Batch Processing and Semaphore Usage in Effect Typescript

Hey everyone!

I'm trying to do some batch processing but can't make it work. I have a queue, a forked fiber that is continuously publishing items to that queue, and another forked fiber that should take from that queue in batches and process them. I want to specify a maximum concurrency that this processing can happen.

At the moment this is processing sequentially and not using up the semaphore permits like i'd expect? Let me know where my understanding is wrong?

Code in thread
Was this page helpful?