import * as _RequestBlock from "@effect/io/internal_effect_untraced/blockedRequests";
import * as cache from "@effect/io/internal_effect_untraced/cache";
import * as core from "@effect/io/internal_effect_untraced/core";
import * as fiberRuntime from "@effect/io/internal_effect_untraced/fiberRuntime";
import * as internal from "@effect/io/internal_effect_untraced/request";
/**
 * @since 1.0.0
 * @category symbols
 */
export const RequestTypeId = internal.RequestTypeId;
/**
 * Returns `true` if the specified value is a `Request`, `false` otherwise.
 *
 * @since 1.0.0
 * @category refinements
 */
export const isRequest = internal.isRequest;
/**
 * Constructs a new `Request`.
 *
 * @since 1.0.0
 * @category constructors
 */
export const of = internal.of;
/**
 * Constructs a new `Request`.
 *
 * @since 1.0.0
 * @category constructors
 */
export const tagged = internal.tagged;
/**
 * Complete a `Request` with the specified result.
 *
 * @since 1.0.0
 * @category request completion
 */
export const complete = internal.complete;
/**
 * Interrupts the child effect when requests are no longer needed
 *
 * @since 1.0.0
 * @category request completion
 */
export const interruptWhenPossible = fiberRuntime.interruptWhenPossible;
/**
 * Complete a `Request` with the specified effectful computation, failing the
 * request with the error from the effect workflow if it fails, and completing
 * the request with the value of the effect workflow if it succeeds.
 *
 * @since 1.0.0
 * @category request completion
 */
export const completeEffect = internal.completeEffect;
/**
 * Complete a `Request` with the specified error.
 *
 * @since 1.0.0
 * @category request completion
 */
export const fail = internal.fail;
/**
 * Complete a `Request` with the specified value.
 *
 * @since 1.0.0
 * @category request completion
 */
export const succeed = internal.succeed;
/**
 * @since 1.0.0
 * @category models
 */
export const makeCache = (capacity, timeToLive) => cache.make(capacity, timeToLive, () => core.map(core.deferredMake(), handle => ({
  listeners: new internal.Listeners(),
  handle
})));
/**
 * @since 1.0.0
 * @category symbols
 */
export const EntryTypeId = /*#__PURE__*/Symbol.for("@effect/io/RequestBlock.Entry");
/**
 * @since 1.0.0
 * @category guards
 */
export const isEntry = _RequestBlock.isEntry;
/**
 * @since 1.0.0
 * @category constructors
 */
export const makeEntry = _RequestBlock.makeEntry;
//# sourceMappingURL=Request.mjs.map