const concurrencyLimit = yield* Effect.makeSemaphore(2);
const ingestQueue = yield* Queue.unbounded<QueuedTransaction>();
const isSyncing = yield* SubscriptionRef.make(false);
const updateSyncStatus = Effect.fn(function* () {
// @ts-expect-error Not exposed on Semaphore
yield* Ref.set(isSyncing, (yield* ingestQueue.isFull) || (concurrencyLimit.taken > 0));
});
const concurrencyLimit = yield* Effect.makeSemaphore(2);
const ingestQueue = yield* Queue.unbounded<QueuedTransaction>();
const isSyncing = yield* SubscriptionRef.make(false);
const updateSyncStatus = Effect.fn(function* () {
// @ts-expect-error Not exposed on Semaphore
yield* Ref.set(isSyncing, (yield* ingestQueue.isFull) || (concurrencyLimit.taken > 0));
});