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

Method cycle

packages/sql/pg/src/PgConnection.ts:1057–1067  ·  view source on GitHub ↗
(
    encode: EncodeCycle,
    output: Output,
    cache: PreparedCache | undefined
  )

Source from the content-addressed store, hash-verified

1055
1056 // Check the lease under the wire permit so queued work cannot run after release.
1057 private cycle(
1058 encode: EncodeCycle,
1059 output: Output,
1060 cache: PreparedCache | undefined
1061 ): Effect.Effect<QueryOutput, SqlError> {
1062 return this.base.wire.withPermit(Effect.suspend(() =>
1063 this.released
1064 ? Effect.fail(pinReleasedError())
1065 : this.base.cycleOwned(encode, output, cache)
1066 ))
1067 }
1068
1069 readonly interrupt: Effect.Effect<void> = Effect.suspend(() => this.released ? Effect.void : this.base.cancel)
1070

Callers 2

PinnedPgConnectionClass · 0.95
run.mjsFile · 0.80

Calls 3

pinReleasedErrorFunction · 0.85
withPermitMethod · 0.80
failMethod · 0.65

Tested by

no test coverage detected