import * as tsplus_module_1 from "@effect/core/stm/TReentrantLock/operations/TReentrantLock/acquireRead";
import * as tsplus_module_2 from "@effect/core/stm/STM/operations/commit";
import * as tsplus_module_3 from "@effect/core/stm/TReentrantLock/operations/TReentrantLock/releaseRead";
import * as tsplus_module_4 from "@effect/core/io/Effect/operations/acquireRelease";
/**
 * Obtains a read lock in a scoped context.
 *
 * @tsplus fluent ets/TReentrantLock readLock
 */

export function readLock(self, __tsplusTrace) {
  return tsplus_module_4.acquireRelease(() => tsplus_module_2.commit(tsplus_module_1.acquireRead(self), __tsplusTrace), _ => tsplus_module_2.commit(tsplus_module_3.releaseRead(self), __tsplusTrace), __tsplusTrace);
}
//# sourceMappingURL=readLock.mjs.map