MCPcopy Create free account
hub / github.com/Effect-TS/effect / leave

Function leave

packages/sql/pg/src/PgPool.ts:256–261  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

254 return Effect.uninterruptibleMask((restore) => {
255 let counting = true
256 const leave = () => {
257 if (counting) {
258 counting = false
259 borrowers[kind]--
260 }
261 }
262 borrowers[kind]++
263 return Effect.ensuring(restore(f(leave)), Effect.sync(leave))
264 })

Callers 1

useFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected