Skip to content

Commit 799a456

Browse files
committed
wip
1 parent b07d15c commit 799a456

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/effect/src/internal/effect/circular.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ class Semaphore {
8686
core.asVoid(
8787
core.withFiberRuntime((fiber) => {
8888
this.permits = permits
89+
if (this.free < 0) {
90+
return core.void
91+
}
8992
return this.updateTakenUnsafe(fiber, (taken) => taken)
9093
})
9194
)

0 commit comments

Comments
 (0)