We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b07d15c commit 799a456Copy full SHA for 799a456
packages/effect/src/internal/effect/circular.ts
@@ -86,6 +86,9 @@ class Semaphore {
86
core.asVoid(
87
core.withFiberRuntime((fiber) => {
88
this.permits = permits
89
+ if (this.free < 0) {
90
+ return core.void
91
+ }
92
return this.updateTakenUnsafe(fiber, (taken) => taken)
93
})
94
)
0 commit comments