import * as tsplus_module_1 from "@effect/core/stm/TSemaphore/operations/withPermit";
import { concreteSemaphore } from "@effect/core/io/Semaphore/operations/_internal/SemaphoreInternal";
/**
 * Executes the specified effect, acquiring a permit immediately before the
 * effect begins execution and releasing it immediately after the effect
 * completes execution, whether by success, failure, or interruption.
 *
 * @tsplus getter ets/Semaphore withPermit
 */

export function withPermit(self, __tsplusTrace) {
  return effect => {
    void 0;
    return tsplus_module_1.withPermit(self.semaphore, __tsplusTrace)(effect);
  };
}
//# sourceMappingURL=withPermit.mjs.map