()
| 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 | }) |