Socket
Socket
Sign inDemoInstall

@effect/io

Package Overview
Dependencies
Maintainers
3
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@effect/io - npm Package Compare versions

Comparing version 0.38.2 to 0.39.0

ConfigError.d.ts

30

Cause.d.ts

@@ -31,3 +31,3 @@ /**

import type { Predicate } from "@effect/data/Predicate";
import type * as FiberId from "@effect/io/Fiber/Id";
import type * as FiberId from "@effect/io/FiberId";
import type { Span } from "@effect/io/Tracer";

@@ -709,3 +709,3 @@ /**

* otherwise.
*
* @since 1.0.0

@@ -726,3 +726,3 @@ * @category refinements

* otherwise.
*
* @since 1.0.0

@@ -741,8 +741,8 @@ * @category refinements

/**
* Returns `true` if the specified value is an `IllegalArgumentException`, `false`
* otherwise.
* @since 1.0.0
* @category refinements
*/
* Returns `true` if the specified value is an `NoSuchElementException`, `false`
* otherwise.
*
* @since 1.0.0
* @category refinements
*/
export declare const isNoSuchElementException: (u: unknown) => u is NoSuchElementException;

@@ -757,8 +757,8 @@ /**

/**
* Returns `true` if the specified value is an `RuntimeException`, `false`
* otherwise.
* @since 1.0.0
* @category refinements
*/
* Returns `true` if the specified value is an `RuntimeException`, `false`
* otherwise.
*
* @since 1.0.0
* @category refinements
*/
export declare const isRuntimeException: (u: unknown) => u is RuntimeException;

@@ -765,0 +765,0 @@ /**

@@ -452,3 +452,3 @@ "use strict";

* otherwise.
*
* @since 1.0.0

@@ -471,3 +471,3 @@ * @category refinements

* otherwise.
*
* @since 1.0.0

@@ -488,8 +488,8 @@ * @category refinements

/**
* Returns `true` if the specified value is an `IllegalArgumentException`, `false`
* otherwise.
* @since 1.0.0
* @category refinements
*/
* Returns `true` if the specified value is an `NoSuchElementException`, `false`
* otherwise.
*
* @since 1.0.0
* @category refinements
*/
exports.NoSuchElementException = NoSuchElementException;

@@ -506,8 +506,8 @@ const isNoSuchElementException = internal.isNoSuchElementException;

/**
* Returns `true` if the specified value is an `RuntimeException`, `false`
* otherwise.
* @since 1.0.0
* @category refinements
*/
* Returns `true` if the specified value is an `RuntimeException`, `false`
* otherwise.
*
* @since 1.0.0
* @category refinements
*/
exports.RuntimeException = RuntimeException;

@@ -514,0 +514,0 @@ const isRuntimeException = internal.isRuntimeException;

@@ -12,5 +12,5 @@ /**

import type { Predicate, Refinement } from "@effect/data/Predicate";
import type * as ConfigError from "@effect/io/Config/Error";
import type * as ConfigSecret from "@effect/io/Config/Secret";
import type * as LogLevel from "@effect/io/Logger/Level";
import type * as ConfigError from "@effect/io/ConfigError";
import type * as ConfigSecret from "@effect/io/ConfigSecret";
import type * as LogLevel from "@effect/io/LogLevel";
/**

@@ -17,0 +17,0 @@ * @since 1.0.0

@@ -44,7 +44,30 @@ /**

warn(...args: ReadonlyArray<any>): Effect<never, never, void>;
withGroup<R, E, A>(self: Effect<R, E, A>, options?: {
readonly unsafe: UnsafeConsole;
}
/**
* @since 1.0.0
* @category model
*/
export interface UnsafeConsole {
assert(condition: boolean, ...args: ReadonlyArray<any>): void;
clear(): void;
count(label?: string): void;
countReset(label?: string): void;
debug(...args: ReadonlyArray<any>): void;
dir(item: any, options?: any): void;
dirxml(...args: ReadonlyArray<any>): void;
error(...args: ReadonlyArray<any>): void;
group(options?: {
readonly label?: string;
readonly collapsed?: boolean;
}): Effect<R, E, A>;
withTime<R, E, A>(self: Effect<R, E, A>, label?: string): Effect<R, E, A>;
}): void;
groupEnd(): void;
info(...args: ReadonlyArray<any>): void;
log(...args: ReadonlyArray<any>): void;
table(tabularData: any, properties?: ReadonlyArray<string>): void;
time(label?: string): void;
timeEnd(label?: string): void;
timeLog(label?: string, ...args: ReadonlyArray<any>): void;
trace(...args: ReadonlyArray<any>): void;
warn(...args: ReadonlyArray<any>): void;
}

@@ -51,0 +74,0 @@ /**

@@ -6,3 +6,3 @@ /**

import type * as Clock from "@effect/io/Clock";
import type * as ConfigProvider from "@effect/io/Config/Provider";
import type * as ConfigProvider from "@effect/io/ConfigProvider";
import type * as Console from "@effect/io/Console";

@@ -9,0 +9,0 @@ import type * as FiberRef from "@effect/io/FiberRef";

@@ -10,3 +10,3 @@ /**

import type * as Exit from "@effect/io/Exit";
import type * as FiberId from "@effect/io/Fiber/Id";
import type * as FiberId from "@effect/io/FiberId";
/**

@@ -13,0 +13,0 @@ * @since 1.0.0

@@ -11,3 +11,3 @@ /**

import type * as Effect from "@effect/io/Effect";
import type * as FiberId from "@effect/io/Fiber/Id";
import type * as FiberId from "@effect/io/FiberId";
/**

@@ -14,0 +14,0 @@ * An `Exit<E, A>` describes the result of a executing an `Effect` workflow.

@@ -12,6 +12,6 @@ /**

import type * as Exit from "@effect/io/Exit";
import type * as FiberId from "@effect/io/Fiber/Id";
import type * as RuntimeFlags from "@effect/io/Fiber/Runtime/Flags";
import type * as FiberStatus from "@effect/io/Fiber/Status";
import type * as FiberId from "@effect/io/FiberId";
import type * as FiberRefs from "@effect/io/FiberRefs";
import type * as FiberStatus from "@effect/io/FiberStatus";
import type * as RuntimeFlags from "@effect/io/RuntimeFlags";
import type * as Scope from "@effect/io/Scope";

@@ -147,2 +147,5 @@ /**

}
/**
* @since 1.0.0
*/
interface RuntimeVariance<E, A> {

@@ -149,0 +152,0 @@ readonly [RuntimeFiberTypeId]: {

@@ -15,8 +15,8 @@ /**

import type * as Effect from "@effect/io/Effect";
import type * as RuntimeFlags from "@effect/io/Fiber/Runtime/Flags";
import type * as Logger from "@effect/io/Logger";
import type * as LogLevel from "@effect/io/Logger/Level";
import type * as LogSpan from "@effect/io/Logger/Span";
import type * as MetricLabel from "@effect/io/Metric/Label";
import type * as LogLevel from "@effect/io/LogLevel";
import type * as LogSpan from "@effect/io/LogSpan";
import type * as MetricLabel from "@effect/io/MetricLabel";
import type * as Request from "@effect/io/Request";
import type * as RuntimeFlags from "@effect/io/RuntimeFlags";
import type * as Scheduler from "@effect/io/Scheduler";

@@ -23,0 +23,0 @@ import type * as Scope from "@effect/io/Scope";

@@ -9,3 +9,3 @@ /**

import type * as Effect from "@effect/io/Effect";
import type * as FiberId from "@effect/io/Fiber/Id";
import type * as FiberId from "@effect/io/FiberId";
import type * as FiberRef from "@effect/io/FiberRef";

@@ -12,0 +12,0 @@ /**

@@ -15,3 +15,3 @@ "use strict";

var ReadonlyArray = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/ReadonlyArray"));
var FiberId = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Fiber/Id"));
var FiberId = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/FiberId"));
var OpCodes = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/opCodes/cause"));

@@ -18,0 +18,0 @@ var MRef = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/MutableRef"));

@@ -7,7 +7,7 @@ "use strict";

exports.currentRequestMap = void 0;
var _Global = /*#__PURE__*/require("@effect/data/Global");
var _GlobalValue = /*#__PURE__*/require("@effect/data/GlobalValue");
var _core = /*#__PURE__*/require("@effect/io/internal/core");
/** @internal */
const currentRequestMap = /*#__PURE__*/(0, _Global.globalValue)( /*#__PURE__*/Symbol.for("@effect/io/FiberRef/currentRequestMap"), () => (0, _core.fiberRefUnsafeMake)(new Map()));
const currentRequestMap = /*#__PURE__*/(0, _GlobalValue.globalValue)( /*#__PURE__*/Symbol.for("@effect/io/FiberRef/currentRequestMap"), () => (0, _core.fiberRefUnsafeMake)(new Map()));
exports.currentRequestMap = currentRequestMap;
//# sourceMappingURL=completedRequestMap.js.map

@@ -13,3 +13,3 @@ "use strict";

var _Pipeable = /*#__PURE__*/require("@effect/data/Pipeable");
var ConfigError = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Config/Error"));
var ConfigError = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/ConfigError"));
var configError = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/configError"));

@@ -16,0 +16,0 @@ var configSecret = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/configSecret"));

@@ -14,3 +14,3 @@ "use strict";

/** @internal */
const ConfigErrorSymbolKey = "@effect/io/Config/Error";
const ConfigErrorSymbolKey = "@effect/io/ConfigError";
/** @internal */

@@ -17,0 +17,0 @@ const ConfigErrorTypeId = /*#__PURE__*/Symbol.for(ConfigErrorSymbolKey);

@@ -26,3 +26,3 @@ "use strict";

/** @internal */
const ConfigProviderSymbolKey = "@effect/io/Config/Provider";
const ConfigProviderSymbolKey = "@effect/io/ConfigProvider";
/** @internal */

@@ -35,3 +35,3 @@ const ConfigProviderTypeId = /*#__PURE__*/Symbol.for(ConfigProviderSymbolKey);

exports.configProviderTag = configProviderTag;
const FlatConfigProviderSymbolKey = "@effect/io/Config/Provider/Flat";
const FlatConfigProviderSymbolKey = "@effect/io/ConfigProviderFlat";
/** @internal */

@@ -112,3 +112,3 @@ const FlatConfigProviderTypeId = /*#__PURE__*/Symbol.for(FlatConfigProviderSymbolKey);

seqDelim
} = Object.assign({}, {
} = Object.assign({
seqDelim: ",",

@@ -115,0 +115,0 @@ pathDelim: "."

@@ -13,3 +13,3 @@ "use strict";

/** @internal */
const ConfigSecretSymbolKey = "@effect/io/Config/Secret";
const ConfigSecretSymbolKey = "@effect/io/ConfigSecret";
/** @internal */

@@ -16,0 +16,0 @@ const ConfigSecretTypeId = /*#__PURE__*/Symbol.for(ConfigSecretSymbolKey);

@@ -77,7 +77,7 @@ "use strict";

exports.warn = warn;
const withGroup = /*#__PURE__*/(0, _Function.dual)(args => core.isEffect(args[0]), (self, options) => consoleWith(_ => _.withGroup(self, options)));
const withGroup = /*#__PURE__*/(0, _Function.dual)(args => core.isEffect(args[0]), (self, options) => consoleWith(_ => core.acquireUseRelease(_.group(options), () => self, () => _.groupEnd)));
/** @internal */
exports.withGroup = withGroup;
const withTime = /*#__PURE__*/(0, _Function.dual)(args => core.isEffect(args[0]), (self, label) => consoleWith(_ => _.withTime(self, label)));
const withTime = /*#__PURE__*/(0, _Function.dual)(args => core.isEffect(args[0]), (self, label) => consoleWith(_ => core.acquireUseRelease(_.time(label), () => self, () => _.timeEnd(label))));
exports.withTime = withTime;
//# sourceMappingURL=console.js.map

@@ -100,10 +100,5 @@ "use strict";

},
withGroup(self, options) {
return core.acquireUseRelease(options?.collapsed ? core.sync(() => console.groupCollapsed(options?.label)) : core.sync(() => console.group(options?.label)), () => self, () => core.sync(() => console.groupEnd()));
},
withTime(self, label) {
return core.acquireUseRelease(core.sync(() => console.time(label)), () => self, () => core.sync(() => console.timeEnd(label)));
}
unsafe: console
};
exports.defaultConsole = defaultConsole;
//# sourceMappingURL=console.js.map

@@ -6,3 +6,3 @@ "use strict";

});
exports.summarized = exports.succeedSome = exports.succeedNone = exports.spanLinks = exports.spanAnnotations = exports.some = exports.sleep = exports.setFiberRefs = exports.serviceMembers = exports.serviceFunctions = exports.serviceFunctionEffect = exports.serviceFunction = exports.serviceConstants = exports.sandbox = exports.repeatN = exports.reduceWhile = exports.reduceRight = exports.reduce = exports.random = exports.provideServiceEffect = exports.provideService = exports.promise = exports.patchFiberRefs = exports.parallelErrors = exports.orElseSucceed = exports.orElseFail = exports.optionFromOptional = exports.option = exports.once = exports.none = exports.negate = exports.merge = exports.memoize = exports.match = exports.mapErrorCause = exports.mapAccum = exports.makeSpan = exports.loop = exports.logWarning = exports.logTrace = exports.logInfo = exports.logFatal = exports.logError = exports.logDebug = exports.logAnnotations = exports.log = exports.linkSpans = exports.labelMetricsSet = exports.labelMetrics = exports.iterate = exports.isSuccess = exports.isFailure = exports.inheritFiberRefs = exports.ignoreLogged = exports.ignore = exports.head = exports.getFiberRefs = exports.gen = exports.fromNullable = exports.forever = exports.flipWith = exports.firstSuccessOf = exports.findFirst = exports.filterOrFail = exports.filterOrElse = exports.filterOrDieMessage = exports.filterOrDie = exports.filterMap = exports.every = exports.eventually = exports.dropWhile = exports.dropUntil = exports.diffFiberRefs = exports.descriptorWith = exports.descriptor = exports.delay = exports.currentTimeNanosTracing = exports.currentSpan = exports.currentParentSpan = exports.contextWith = exports.clockWith = exports.clock = exports.cause = exports.catchTags = exports.catchTag = exports.catchSomeDefect = exports.catchSomeCause = exports.catchAllDefect = exports.bindValue = exports.bindTo = exports.bind = exports.asyncOption = exports.asSomeError = exports.asSome = exports.annotateSpans = exports.annotateLogs = exports.annotateCurrentSpan = exports.allowInterrupt = exports._catch = exports.Do = void 0;
exports.summarized = exports.succeedSome = exports.succeedNone = exports.spanLinks = exports.spanAnnotations = exports.sleep = exports.setFiberRefs = exports.serviceMembers = exports.serviceFunctions = exports.serviceFunctionEffect = exports.serviceFunction = exports.serviceConstants = exports.sandbox = exports.repeatN = exports.reduceWhile = exports.reduceRight = exports.reduce = exports.random = exports.provideServiceEffect = exports.provideService = exports.promise = exports.patchFiberRefs = exports.parallelErrors = exports.orElseSucceed = exports.orElseFail = exports.optionFromOptional = exports.option = exports.once = exports.none = exports.negate = exports.merge = exports.memoize = exports.match = exports.mapErrorCause = exports.mapAccum = exports.makeSpan = exports.loop = exports.logWarning = exports.logTrace = exports.logInfo = exports.logFatal = exports.logError = exports.logDebug = exports.logAnnotations = exports.log = exports.linkSpans = exports.labelMetricsSet = exports.labelMetrics = exports.iterate = exports.isSuccess = exports.isFailure = exports.inheritFiberRefs = exports.ignoreLogged = exports.ignore = exports.head = exports.gen = exports.fromNullable = exports.forever = exports.flipWith = exports.firstSuccessOf = exports.findFirst = exports.filterOrFail = exports.filterOrElse = exports.filterOrDieMessage = exports.filterOrDie = exports.filterMap = exports.fiberRefs = exports.every = exports.eventually = exports.dropWhile = exports.dropUntil = exports.diffFiberRefsAndRuntimeFlags = exports.diffFiberRefs = exports.descriptorWith = exports.descriptor = exports.delay = exports.currentTimeNanosTracing = exports.currentSpan = exports.currentParentSpan = exports.contextWith = exports.clockWith = exports.clock = exports.cause = exports.catchTags = exports.catchTag = exports.catchSomeDefect = exports.catchSomeCause = exports.catchAllDefect = exports.bindValue = exports.bindTo = exports.bind = exports.asyncOption = exports.asSomeError = exports.asSome = exports.annotateSpans = exports.annotateLogs = exports.annotateCurrentSpan = exports.allowInterrupt = exports._catch = exports.Do = void 0;
exports.withSpan = exports.withParentSpan = exports.withMetric = exports.withLogSpan = exports.whenRef = exports.whenFiberRef = exports.when = exports.useSpan = exports.updateService = exports.updateFiberRefs = exports.unsandbox = exports.unlessEffect = exports.unless = exports.try_ = exports.tryPromise = exports.tryMapPromise = exports.tryMap = exports.tracerWith = exports.tracer = exports.timedWith = exports.timed = exports.tapErrorTag = exports.tapErrorCause = exports.tapError = exports.tapDefect = exports.tapBoth = exports.takeWhile = exports.takeUntil = exports.tagMetrics = void 0;

@@ -21,3 +21,3 @@ var Chunk = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Chunk"));

var Clock = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Clock"));
var FiberId = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Fiber/Id"));
var FiberId = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/FiberId"));
var FiberRefs = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/FiberRefs"));

@@ -29,5 +29,6 @@ var internalCause = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/cause"));

var metricLabel = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/metric/label"));
var runtimeFlags = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/runtimeFlags"));
var SingleShotGen = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/singleShotGen"));
var LogLevel = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Logger/Level"));
var LogSpan = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Logger/Span"));
var LogLevel = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/LogLevel"));
var LogSpan = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/LogSpan"));
var Ref = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Ref"));

@@ -143,17 +144,12 @@ var Tracer = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Tracer"));

exports.catchSomeDefect = catchSomeDefect;
const catchTag = /*#__PURE__*/(0, _Function.dual)(3, (self, k, f) => core.catchAll(self, e => {
if (Predicate.isObject(e) && "_tag" in e && e["_tag"] === k) {
return f(e);
}
return core.fail(e);
}));
const catchTag = /*#__PURE__*/(0, _Function.dual)(3, (self, k, f) => core.catchIf(self, Predicate.isTagged(k), f));
/** @internal */
exports.catchTag = catchTag;
const catchTags = /*#__PURE__*/(0, _Function.dual)(2, (self, cases) => core.catchAll(self, e => {
const keys = Object.keys(cases);
if (Predicate.isObject(e) && "_tag" in e && keys.includes(e["_tag"])) {
return cases[e["_tag"]](e);
}
return core.fail(e);
}));
const catchTags = /*#__PURE__*/(0, _Function.dual)(2, (self, cases) => {
let keys;
return core.catchIf(self, e => {
keys ??= Object.keys(cases);
return Predicate.isObject(e) && "_tag" in e && keys.includes(e["_tag"]);
}, e => cases[e["_tag"]](e));
});
/* @internal */

@@ -189,5 +185,8 @@ exports.catchTags = catchTags;

exports.descriptor = descriptor;
const diffFiberRefs = self => summarized(self, getFiberRefs, fiberRefsPatch.diff);
const diffFiberRefs = self => summarized(self, fiberRefs, fiberRefsPatch.diff);
/* @internal */
exports.diffFiberRefs = diffFiberRefs;
const diffFiberRefsAndRuntimeFlags = self => summarized(self, core.zip(fiberRefs, core.runtimeFlags), ([refs, flags], [refsNew, flagsNew]) => [fiberRefsPatch.diff(refs, refsNew), runtimeFlags.diff(flags, flagsNew)]);
/* @internal */
exports.diffFiberRefsAndRuntimeFlags = diffFiberRefsAndRuntimeFlags;
const Do = /*#__PURE__*/core.succeed({});

@@ -263,3 +262,3 @@ /* @internal */

exports.filterMap = filterMap;
const filterOrDie = /*#__PURE__*/(0, _Function.dual)(3, (self, filter, orDieWith) => filterOrElse(self, filter, () => core.dieSync(orDieWith)));
const filterOrDie = /*#__PURE__*/(0, _Function.dual)(3, (self, filter, orDieWith) => filterOrElse(self, filter, a => core.dieSync(() => orDieWith(a))));
/* @internal */

@@ -356,5 +355,5 @@ exports.filterOrDie = filterOrDie;

exports.gen = gen;
const getFiberRefs = /*#__PURE__*/core.withFiberRuntime(state => core.succeed(state.unsafeGetFiberRefs()));
const fiberRefs = /*#__PURE__*/core.withFiberRuntime(state => core.succeed(state.unsafeGetFiberRefs()));
/* @internal */
exports.getFiberRefs = getFiberRefs;
exports.fiberRefs = fiberRefs;
const head = self => core.matchEffect(self, {

@@ -480,3 +479,3 @@ onFailure: e => core.fail(Option.some(e)),

exports.mapErrorCause = mapErrorCause;
const memoize = self => core.flatMap(deferred => core.map(complete => core.zipRight(complete, core.flatMap(([patch, a]) => core.as(patchFiberRefs(patch), a))(core.deferredAwait(deferred))))(once(core.intoDeferred(deferred)(diffFiberRefs(self)))))(core.deferredMake());
const memoize = self => core.flatMap(deferred => core.map(complete => core.zipRight(complete, core.flatMap(([patch, a]) => core.as(core.zip(patchFiberRefs(patch[0]), core.updateRuntimeFlags(patch[1])), a))(core.deferredAwait(deferred))))(once(core.intoDeferred(deferred)(diffFiberRefsAndRuntimeFlags(self)))))(core.deferredMake());
/* @internal */

@@ -587,19 +586,2 @@ exports.memoize = memoize;

exports.sleep = sleep;
const some = self => core.matchEffect(self, {
onFailure: e => core.fail(Option.some(e)),
onSuccess: option => {
switch (option._tag) {
case "None":
{
return core.fail(Option.none());
}
case "Some":
{
return core.succeed(option.value);
}
}
}
});
/* @internal */
exports.some = some;
const succeedNone = /*#__PURE__*/core.succeed( /*#__PURE__*/Option.none());

@@ -710,3 +692,3 @@ /* @internal */

const tapErrorTag = /*#__PURE__*/(0, _Function.dual)(3, (self, k, f) => tapError(self, e => {
if (Predicate.isObject(e) && "_tag" in e && e["_tag"] === k) {
if (Predicate.isTagged(e, k)) {
return f(e);

@@ -899,9 +881,3 @@ }

exports.withSpan = withSpan;
const fromNullable = evaluate => core.suspend(() => {
const a = evaluate();
if (a === null || a === undefined) {
return core.fail(internalCause.NoSuchElementException());
}
return core.succeed(a);
});
const fromNullable = value => value == null ? core.fail(internalCause.NoSuchElementException()) : core.succeed(value);
/* @internal */

@@ -908,0 +884,0 @@ exports.fromNullable = fromNullable;

@@ -17,3 +17,3 @@ "use strict";

var Exit = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Exit"));
var FiberId = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Fiber/Id"));
var FiberId = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/FiberId"));
var internalCause = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/cause"));

@@ -233,3 +233,3 @@ var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/core"));

exports.timeoutTo = timeoutTo;
const SynchronizedSymbolKey = "@effect/io/Ref/Synchronized";
const SynchronizedSymbolKey = "@effect/io/Ref/SynchronizedRef";
/** @internal */

@@ -236,0 +236,0 @@ const SynchronizedTypeId = /*#__PURE__*/Symbol.for(SynchronizedSymbolKey);

@@ -16,4 +16,4 @@ "use strict";

var Exit = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Exit"));
var FiberId = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Fiber/Id"));
var FiberStatus = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Fiber/Status"));
var FiberId = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/FiberId"));
var FiberStatus = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/FiberStatus"));
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/core"));

@@ -255,3 +255,3 @@ var fiberScope = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/fiberScope"));

exports.unit = unit;
const currentFiberURI = "@effect/io/Fiber/Current";
const currentFiberURI = "@effect/io/FiberCurrent";
/** @internal */

@@ -258,0 +258,0 @@ exports.currentFiberURI = currentFiberURI;

@@ -9,3 +9,3 @@ "use strict";

var _Function = /*#__PURE__*/require("@effect/data/Function");
var _Global = /*#__PURE__*/require("@effect/data/Global");
var _GlobalValue = /*#__PURE__*/require("@effect/data/GlobalValue");
var Hash = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Hash"));

@@ -19,3 +19,3 @@ var HashSet = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/HashSet"));

/** @internal */
const FiberIdSymbolKey = "@effect/io/Fiber/Id";
const FiberIdSymbolKey = "@effect/io/FiberId";
/** @internal */

@@ -143,3 +143,3 @@ const FiberIdTypeId = /*#__PURE__*/Symbol.for(FiberIdSymbolKey);

exports.ids = ids;
const _fiberCounter = /*#__PURE__*/(0, _Global.globalValue)( /*#__PURE__*/Symbol.for("@effect/io/Fiber/Id/_fiberCounter"), () => MutableRef.make(0));
const _fiberCounter = /*#__PURE__*/(0, _GlobalValue.globalValue)( /*#__PURE__*/Symbol.for("@effect/io/Fiber/Id/_fiberCounter"), () => MutableRef.make(0));
/** @internal */

@@ -146,0 +146,0 @@ const make = (id, startTimeSeconds) => {

@@ -1,4 +0,4 @@

import * as FiberId from "@effect/io/Fiber/Id";
import type * as RuntimeFlags from "@effect/io/Fiber/Runtime/Flags";
import * as FiberId from "@effect/io/FiberId";
import type * as FiberRuntime from "@effect/io/internal/fiberRuntime";
import type * as RuntimeFlags from "@effect/io/RuntimeFlags";
export type FiberScopeTypeId = typeof FiberScopeTypeId;

@@ -5,0 +5,0 @@ /**

@@ -7,4 +7,4 @@ "use strict";

exports.unsafeMake = exports.globalScope = exports.FiberScopeTypeId = void 0;
var _Global = /*#__PURE__*/require("@effect/data/Global");
var FiberId = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Fiber/Id"));
var _GlobalValue = /*#__PURE__*/require("@effect/data/GlobalValue");
var FiberId = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/FiberId"));
var FiberMessage = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/fiberMessage"));

@@ -15,3 +15,3 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

/** @internal */
const FiberScopeSymbolKey = "@effect/io/Fiber/Scope";
const FiberScopeSymbolKey = "@effect/io/FiberScope";
/** @internal */

@@ -58,4 +58,4 @@ const FiberScopeTypeId = /*#__PURE__*/Symbol.for(FiberScopeSymbolKey);

exports.unsafeMake = unsafeMake;
const globalScope = /*#__PURE__*/(0, _Global.globalValue)( /*#__PURE__*/Symbol.for("@effect/io/FiberScope/Global"), () => new Global());
const globalScope = /*#__PURE__*/(0, _GlobalValue.globalValue)( /*#__PURE__*/Symbol.for("@effect/io/FiberScope/Global"), () => new Global());
exports.globalScope = globalScope;
//# sourceMappingURL=fiberScope.js.map

@@ -12,3 +12,3 @@ "use strict";

var _a, _b, _c;
const FiberStatusSymbolKey = "@effect/io/Fiber/Status";
const FiberStatusSymbolKey = "@effect/io/FiberStatus";
/** @internal */

@@ -15,0 +15,0 @@ const FiberStatusTypeId = /*#__PURE__*/Symbol.for(FiberStatusSymbolKey);

@@ -11,2 +11,3 @@ "use strict";

var MutableRef = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/MutableRef"));
var Option = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Option"));
var _Pipeable = /*#__PURE__*/require("@effect/data/Pipeable");

@@ -666,2 +667,8 @@ var cause = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/cause"));

}
unsafeSize() {
if (MutableRef.get(this.shutdownFlag)) {
return Option.none();
}
return Option.some(this.subscription.size());
}
isFull() {

@@ -767,2 +774,8 @@ return core.map(this.size(), size => size === this.capacity());

}
unsafeSize() {
if (MutableRef.get(this.shutdownFlag)) {
return Option.none();
}
return Option.some(this.hub.size());
}
isFull() {

@@ -769,0 +782,0 @@ return core.map(this.size(), size => size === this.capacity());

@@ -15,2 +15,3 @@ "use strict";

var _Pipeable = /*#__PURE__*/require("@effect/data/Pipeable");
var Predicate = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Predicate"));
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/core"));

@@ -63,3 +64,3 @@ var fiberRuntime = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/fiberRuntime"));

}
const isComplete = u => typeof u === "object" && u != null && KeyedPoolMapValueSymbol in u && "_tag" in u && u["_tag"] === "Complete";
const isComplete = u => Predicate.isTagged(u, "Complete") && KeyedPoolMapValueSymbol in u;
class Pending {

@@ -78,3 +79,3 @@ constructor(deferred) {

}
const isPending = u => typeof u === "object" && u != null && KeyedPoolMapValueSymbol in u && "_tag" in u && u["_tag"] === "Pending";
const isPending = u => Predicate.isTagged(u, "Pending") && KeyedPoolMapValueSymbol in u;
const makeImpl = (get, min, max, timeToLive) => core.map(([context, fiberId, map, scope]) => {

@@ -81,0 +82,0 @@ const getOrCreatePool = key => core.suspend(() => {

@@ -24,4 +24,4 @@ "use strict";

var synchronized = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/synchronizedRef"));
var ScheduleDecision = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Schedule/Decision"));
var Intervals = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Schedule/Intervals"));
var ScheduleDecision = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/ScheduleDecision"));
var Intervals = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/ScheduleIntervals"));
var Scope = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Scope"));

@@ -28,0 +28,0 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

@@ -14,3 +14,3 @@ "use strict";

var _fiberId = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/fiberId"));
var LogSpan = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Logger/Span"));
var LogSpan = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/LogSpan"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

@@ -17,0 +17,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

@@ -9,3 +9,3 @@ "use strict";

var _Function = /*#__PURE__*/require("@effect/data/Function");
var _Global = /*#__PURE__*/require("@effect/data/Global");
var _GlobalValue = /*#__PURE__*/require("@effect/data/GlobalValue");
var HashSet = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/HashSet"));

@@ -36,3 +36,3 @@ var _Pipeable = /*#__PURE__*/require("@effect/data/Pipeable");

/** @internal */
const globalMetricRegistry = /*#__PURE__*/(0, _Global.globalValue)( /*#__PURE__*/Symbol.for("@effect/io/Metric/globalMetricRegistry"), () => metricRegistry.make());
const globalMetricRegistry = /*#__PURE__*/(0, _GlobalValue.globalValue)( /*#__PURE__*/Symbol.for("@effect/io/Metric/globalMetricRegistry"), () => metricRegistry.make());
/** @internal */

@@ -39,0 +39,0 @@ exports.globalMetricRegistry = globalMetricRegistry;

@@ -16,3 +16,3 @@ "use strict";

/** @internal */
const MetricBoundariesSymbolKey = "@effect/io/Metric/Boundaries";
const MetricBoundariesSymbolKey = "@effect/io/MetricBoundaries";
/** @internal */

@@ -19,0 +19,0 @@ const MetricBoundariesTypeId = /*#__PURE__*/Symbol.for(MetricBoundariesSymbolKey);

@@ -19,3 +19,3 @@ "use strict";

/** @internal */
const MetricHookSymbolKey = "@effect/io/Metric/Hook";
const MetricHookSymbolKey = "@effect/io/MetricHook";
/** @internal */

@@ -22,0 +22,0 @@ const MetricHookTypeId = /*#__PURE__*/Symbol.for(MetricHookSymbolKey);

@@ -19,3 +19,3 @@ "use strict";

/** @internal */
const MetricKeySymbolKey = "@effect/io/Metric/Key";
const MetricKeySymbolKey = "@effect/io/MetricKey";
/** @internal */

@@ -22,0 +22,0 @@ const MetricKeyTypeId = /*#__PURE__*/Symbol.for(MetricKeySymbolKey);

@@ -5,4 +5,4 @@ import type * as Chunk from "@effect/data/Chunk";

import * as Hash from "@effect/data/Hash";
import type * as MetricBoundaries from "@effect/io/Metric/Boundaries";
import type * as MetricKeyType from "@effect/io/Metric/KeyType";
import type * as MetricBoundaries from "@effect/io/MetricBoundaries";
import type * as MetricKeyType from "@effect/io/MetricKeyType";
/**

@@ -9,0 +9,0 @@ * @category model

@@ -15,3 +15,3 @@ "use strict";

/** @internal */
const MetricKeyTypeSymbolKey = "@effect/io/Metric/KeyType";
const MetricKeyTypeSymbolKey = "@effect/io/MetricKeyType";
/** @internal */

@@ -21,3 +21,3 @@ const MetricKeyTypeTypeId = /*#__PURE__*/Symbol.for(MetricKeyTypeSymbolKey);

exports.MetricKeyTypeTypeId = MetricKeyTypeTypeId;
const CounterKeyTypeSymbolKey = "effect/io/Metric/KeyType/Counter";
const CounterKeyTypeSymbolKey = "effect/io/MetricKeyTypeCounter";
/** @internal */

@@ -27,3 +27,3 @@ const CounterKeyTypeTypeId = /*#__PURE__*/Symbol.for(CounterKeyTypeSymbolKey);

exports.CounterKeyTypeTypeId = CounterKeyTypeTypeId;
const FrequencyKeyTypeSymbolKey = "effect/io/Metric/KeyType/Frequency";
const FrequencyKeyTypeSymbolKey = "effect/io/MetricKeyTypeFrequency";
/** @internal */

@@ -33,3 +33,3 @@ const FrequencyKeyTypeTypeId = /*#__PURE__*/Symbol.for(FrequencyKeyTypeSymbolKey);

exports.FrequencyKeyTypeTypeId = FrequencyKeyTypeTypeId;
const GaugeKeyTypeSymbolKey = "effect/io/Metric/KeyType/Gauge";
const GaugeKeyTypeSymbolKey = "effect/io/MetricKeyTypeGauge";
/** @internal */

@@ -39,3 +39,3 @@ const GaugeKeyTypeTypeId = /*#__PURE__*/Symbol.for(GaugeKeyTypeSymbolKey);

exports.GaugeKeyTypeTypeId = GaugeKeyTypeTypeId;
const HistogramKeyTypeSymbolKey = "effect/io/Metric/KeyType/Histogram";
const HistogramKeyTypeSymbolKey = "effect/io/MetricKeyTypeHistogram";
/** @internal */

@@ -45,3 +45,3 @@ const HistogramKeyTypeTypeId = /*#__PURE__*/Symbol.for(HistogramKeyTypeSymbolKey);

exports.HistogramKeyTypeTypeId = HistogramKeyTypeTypeId;
const SummaryKeyTypeSymbolKey = "effect/io/Metric/KeyType/Summary";
const SummaryKeyTypeSymbolKey = "effect/io/MetricKeyTypeSummary";
/** @internal */

@@ -48,0 +48,0 @@ const SummaryKeyTypeTypeId = /*#__PURE__*/Symbol.for(SummaryKeyTypeSymbolKey);

@@ -14,3 +14,3 @@ "use strict";

/** @internal */
const MetricLabelSymbolKey = "@effect/io/Metric/Label";
const MetricLabelSymbolKey = "@effect/io/MetricLabel";
/** @internal */

@@ -17,0 +17,0 @@ const MetricLabelTypeId = /*#__PURE__*/Symbol.for(MetricLabelSymbolKey);

@@ -9,3 +9,3 @@ "use strict";

/** @internal */
const MetricPairSymbolKey = "@effect/io/Metric/Pair";
const MetricPairSymbolKey = "@effect/io/MetricPair";
/** @internal */

@@ -12,0 +12,0 @@ const MetricPairTypeId = /*#__PURE__*/Symbol.for(MetricPairSymbolKey);

@@ -16,3 +16,3 @@ "use strict";

/** @internal */
const PollingMetricSymbolKey = "@effect/io/Metric/Polling";
const PollingMetricSymbolKey = "@effect/io/MetricPolling";
/** @internal */

@@ -19,0 +19,0 @@ const PollingMetricTypeId = /*#__PURE__*/Symbol.for(PollingMetricSymbolKey);

@@ -17,3 +17,3 @@ "use strict";

/** @internal */
const MetricRegistrySymbolKey = "@effect/io/Metric/Registry";
const MetricRegistrySymbolKey = "@effect/io/MetricRegistry";
/** @internal */

@@ -20,0 +20,0 @@ const MetricRegistryTypeId = /*#__PURE__*/Symbol.for(MetricRegistrySymbolKey);

@@ -1,2 +0,2 @@

import type * as MetricState from "@effect/io/Metric/State";
import type * as MetricState from "@effect/io/MetricState";
/**

@@ -3,0 +3,0 @@ * @since 1.0.0

@@ -14,3 +14,3 @@ "use strict";

/** @internal */
const MetricStateSymbolKey = "@effect/io/Metric/State";
const MetricStateSymbolKey = "@effect/io/MetricState";
/** @internal */

@@ -20,3 +20,3 @@ const MetricStateTypeId = /*#__PURE__*/Symbol.for(MetricStateSymbolKey);

exports.MetricStateTypeId = MetricStateTypeId;
const CounterStateSymbolKey = "effect/io/Metric/State/Counter";
const CounterStateSymbolKey = "effect/io/MetricStateCounter";
/** @internal */

@@ -26,3 +26,3 @@ const CounterStateTypeId = /*#__PURE__*/Symbol.for(CounterStateSymbolKey);

exports.CounterStateTypeId = CounterStateTypeId;
const FrequencyStateSymbolKey = "effect/io/Metric/State/Frequency";
const FrequencyStateSymbolKey = "effect/io/MetricStateFrequency";
/** @internal */

@@ -32,3 +32,3 @@ const FrequencyStateTypeId = /*#__PURE__*/Symbol.for(FrequencyStateSymbolKey);

exports.FrequencyStateTypeId = FrequencyStateTypeId;
const GaugeStateSymbolKey = "effect/io/Metric/State/Gauge";
const GaugeStateSymbolKey = "effect/io/MetricStateGauge";
/** @internal */

@@ -38,3 +38,3 @@ const GaugeStateTypeId = /*#__PURE__*/Symbol.for(GaugeStateSymbolKey);

exports.GaugeStateTypeId = GaugeStateTypeId;
const HistogramStateSymbolKey = "effect/io/Metric/State/Histogram";
const HistogramStateSymbolKey = "effect/io/MetricStateHistogram";
/** @internal */

@@ -44,3 +44,3 @@ const HistogramStateTypeId = /*#__PURE__*/Symbol.for(HistogramStateSymbolKey);

exports.HistogramStateTypeId = HistogramStateTypeId;
const SummaryStateSymbolKey = "effect/io/Metric/State/Summary";
const SummaryStateSymbolKey = "effect/io/MetricStateSummary";
/** @internal */

@@ -47,0 +47,0 @@ const SummaryStateTypeId = /*#__PURE__*/Symbol.for(SummaryStateSymbolKey);

@@ -6,3 +6,3 @@ "use strict";

});
exports.OP_YIELD = exports.OP_WITH_RUNTIME = exports.OP_WHILE = exports.OP_UPDATE_RUNTIME_FLAGS = exports.OP_TAG = exports.OP_SYNC = exports.OP_SUCCESS = exports.OP_REVERT_FLAGS = exports.OP_ON_SUCCESS_AND_FAILURE = exports.OP_ON_SUCCESS = exports.OP_ON_FAILURE = exports.OP_FAILURE = exports.OP_COMMIT = exports.OP_ASYNC = void 0;
exports.OP_YIELD = exports.OP_WITH_RUNTIME = exports.OP_WHILE = exports.OP_UPDATE_RUNTIME_FLAGS = exports.OP_TAG = exports.OP_SYNC = exports.OP_SUCCESS = exports.OP_REVERT_FLAGS = exports.OP_ON_SUCCESS_AND_FAILURE = exports.OP_ON_SUCCESS = exports.OP_ON_FAILURE = exports.OP_FAILURE_WITH_ANNOTATION = exports.OP_FAILURE = exports.OP_COMMIT = exports.OP_ASYNC = void 0;
/** @internal */

@@ -18,2 +18,5 @@ const OP_ASYNC = "Async";

exports.OP_FAILURE = OP_FAILURE;
const OP_FAILURE_WITH_ANNOTATION = "FailureWithAnnotation";
/** @internal */
exports.OP_FAILURE_WITH_ANNOTATION = OP_FAILURE_WITH_ANNOTATION;
const OP_ON_FAILURE = "OnFailure";

@@ -20,0 +23,0 @@ /** @internal */

@@ -9,3 +9,3 @@ "use strict";

var _Function = /*#__PURE__*/require("@effect/data/Function");
var _Global = /*#__PURE__*/require("@effect/data/Global");
var _GlobalValue = /*#__PURE__*/require("@effect/data/GlobalValue");
var BlockedRequests = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/blockedRequests"));

@@ -26,3 +26,3 @@ var _cache = /*#__PURE__*/require("@effect/io/internal/cache");

exports.currentCache = currentCache;
const currentCacheEnabled = /*#__PURE__*/(0, _Global.globalValue)( /*#__PURE__*/Symbol.for("@effect/io/FiberRef/currentCacheEnabled"), () => core.fiberRefUnsafeMake(false));
const currentCacheEnabled = /*#__PURE__*/(0, _GlobalValue.globalValue)( /*#__PURE__*/Symbol.for("@effect/io/FiberRef/currentCacheEnabled"), () => core.fiberRefUnsafeMake(false));
/** @internal */

@@ -29,0 +29,0 @@ exports.currentCacheEnabled = currentCacheEnabled;

@@ -6,3 +6,3 @@ "use strict";

});
exports.unsafeRemove = exports.unsafeOffer = exports.unsafeCompleteTakers = exports.unbounded = exports.takeUpTo = exports.takeN = exports.takeBetween = exports.takeAll = exports.take = exports.slidingStrategy = exports.sliding = exports.size = exports.shutdown = exports.poll = exports.offerAll = exports.offer = exports.isShutdown = exports.isQueue = exports.isFull = exports.isEnqueue = exports.isEmpty = exports.isDequeue = exports.enqueueVariance = exports.droppingStrategy = exports.dropping = exports.dequeueVariance = exports.capacity = exports.bounded = exports.backPressureStrategy = exports.awaitShutdown = exports.QueueStrategyTypeId = exports.EnqueueTypeId = exports.DequeueTypeId = void 0;
exports.unsafeRemove = exports.unsafeOffer = exports.unsafeCompleteTakers = exports.unbounded = exports.takeUpTo = exports.takeN = exports.takeBetween = exports.takeAll = exports.take = exports.slidingStrategy = exports.sliding = exports.size = exports.shutdown = exports.poll = exports.offerAll = exports.offer = exports.make = exports.isShutdown = exports.isQueue = exports.isFull = exports.isEnqueue = exports.isEmpty = exports.isDequeue = exports.enqueueVariance = exports.droppingStrategy = exports.dropping = exports.dequeueVariance = exports.capacity = exports.bounded = exports.backingQueueFromMutableQueue = exports.backPressureStrategy = exports.awaitShutdown = exports.QueueStrategyTypeId = exports.EnqueueTypeId = exports.DequeueTypeId = exports.BackingQueueFromMutableQueue = void 0;
var Chunk = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Chunk"));

@@ -12,2 +12,3 @@ var _Function = /*#__PURE__*/require("@effect/data/Function");

var MutableRef = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/MutableRef"));
var Option = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Option"));
var _Pipeable = /*#__PURE__*/require("@effect/data/Pipeable");

@@ -21,3 +22,3 @@ var ReadonlyArray = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/ReadonlyArray"));

/** @internal */
const EnqueueSymbolKey = "@effect/io/Queue/Enqueue";
const EnqueueSymbolKey = "@effect/io/QueueEnqueue";
/** @internal */

@@ -27,3 +28,3 @@ const EnqueueTypeId = /*#__PURE__*/Symbol.for(EnqueueSymbolKey);

exports.EnqueueTypeId = EnqueueTypeId;
const DequeueSymbolKey = "@effect/io/Queue/Dequeue";
const DequeueSymbolKey = "@effect/io/QueueDequeue";
/** @internal */

@@ -33,3 +34,3 @@ const DequeueTypeId = /*#__PURE__*/Symbol.for(DequeueSymbolKey);

exports.DequeueTypeId = DequeueTypeId;
const QueueStrategySymbolKey = "@effect/io/Queue/Strategy";
const QueueStrategySymbolKey = "@effect/io/QueueStrategy";
/** @internal */

@@ -72,7 +73,13 @@ const QueueStrategyTypeId = /*#__PURE__*/Symbol.for(QueueStrategySymbolKey);

capacity() {
return MutableQueue.capacity(this.queue);
return this.queue.capacity();
}
size() {
return core.suspend(() => MutableRef.get(this.shutdownFlag) ? core.interrupt : core.succeed(MutableQueue.length(this.queue) - MutableQueue.length(this.takers) + this.strategy.surplusSize()));
return core.suspend(() => core.catchAll(this.unsafeSize(), () => core.interrupt));
}
unsafeSize() {
if (MutableRef.get(this.shutdownFlag)) {
return Option.none();
}
return Option.some(this.queue.length() - MutableQueue.length(this.takers) + this.strategy.surplusSize());
}
isEmpty() {

@@ -104,3 +111,3 @@ return core.map(this.size(), size => size <= 0);

let noRemaining;
if (MutableQueue.isEmpty(this.queue)) {
if (this.queue.length() === 0) {
const taker = MutableQueue.poll(MutableQueue.EmptyMutableQueue)(this.takers);

@@ -120,3 +127,3 @@ if (taker !== MutableQueue.EmptyMutableQueue) {

// Not enough takers, offer to the queue
const succeeded = MutableQueue.offer(value)(this.queue);
const succeeded = this.queue.offer(value);
unsafeCompleteTakers(this.strategy, this.queue, this.takers);

@@ -131,3 +138,3 @@ return succeeded;

let noRemaining;
if (MutableQueue.isEmpty(this.queue)) {
if (this.queue.length() === 0) {
const taker = MutableQueue.poll(MutableQueue.EmptyMutableQueue)(this.takers);

@@ -147,3 +154,3 @@ if (taker !== MutableQueue.EmptyMutableQueue) {

// Not enough takers, offer to the queue
const succeeded = MutableQueue.offer(value)(this.queue);
const succeeded = this.queue.offer(value);
unsafeCompleteTakers(this.strategy, this.queue, this.takers);

@@ -159,3 +166,3 @@ return succeeded ? core.succeed(true) : this.strategy.handleSurplus([value], this.queue, this.takers, this.shutdownFlag);

const values = ReadonlyArray.fromIterable(iterable);
const pTakers = MutableQueue.isEmpty(this.queue) ? ReadonlyArray.fromIterable(unsafePollN(this.takers, values.length)) : ReadonlyArray.empty;
const pTakers = this.queue.length() === 0 ? ReadonlyArray.fromIterable(unsafePollN(this.takers, values.length)) : ReadonlyArray.empty;
const [forTakers, remaining] = ReadonlyArray.splitAt(pTakers.length)(values);

@@ -171,3 +178,3 @@ for (let i = 0; i < pTakers.length; i++) {

// Not enough takers, offer to the queue
const surplus = unsafeOfferAll(this.queue, remaining);
const surplus = this.queue.offerAll(remaining);
unsafeCompleteTakers(this.strategy, this.queue, this.takers);

@@ -182,3 +189,3 @@ return Chunk.isEmpty(surplus) ? core.succeed(true) : this.strategy.handleSurplus(surplus, this.queue, this.takers, this.shutdownFlag);

}
const item = MutableQueue.poll(MutableQueue.EmptyMutableQueue)(this.queue);
const item = this.queue.poll(MutableQueue.EmptyMutableQueue);
if (item !== MutableQueue.EmptyMutableQueue) {

@@ -206,3 +213,3 @@ this.strategy.unsafeOnQueueEmptySpace(this.queue, this.takers);

return MutableRef.get(this.shutdownFlag) ? core.interrupt : core.sync(() => {
const values = unsafePollAll(this.queue);
const values = this.queue.pollUpTo(Number.POSITIVE_INFINITY);
this.strategy.unsafeOnQueueEmptySpace(this.queue, this.takers);

@@ -215,3 +222,3 @@ return Chunk.fromIterable(values);

return core.suspend(() => MutableRef.get(this.shutdownFlag) ? core.interrupt : core.sync(() => {
const values = unsafePollN(this.queue, max);
const values = this.queue.pollUpTo(max);
this.strategy.unsafeOnQueueEmptySpace(this.queue, this.takers);

@@ -252,12 +259,12 @@ return Chunk.fromIterable(values);

exports.isDequeue = isDequeue;
const bounded = requestedCapacity => core.flatMap(queue => make(queue, backPressureStrategy()))(core.sync(() => MutableQueue.bounded(requestedCapacity)));
const bounded = requestedCapacity => core.flatMap(queue => make(backingQueueFromMutableQueue(queue), backPressureStrategy()))(core.sync(() => MutableQueue.bounded(requestedCapacity)));
/** @internal */
exports.bounded = bounded;
const dropping = requestedCapacity => core.flatMap(queue => make(queue, droppingStrategy()))(core.sync(() => MutableQueue.bounded(requestedCapacity)));
const dropping = requestedCapacity => core.flatMap(queue => make(backingQueueFromMutableQueue(queue), droppingStrategy()))(core.sync(() => MutableQueue.bounded(requestedCapacity)));
/** @internal */
exports.dropping = dropping;
const sliding = requestedCapacity => core.flatMap(queue => make(queue, slidingStrategy()))(core.sync(() => MutableQueue.bounded(requestedCapacity)));
const sliding = requestedCapacity => core.flatMap(queue => make(backingQueueFromMutableQueue(queue), slidingStrategy()))(core.sync(() => MutableQueue.bounded(requestedCapacity)));
/** @internal */
exports.sliding = sliding;
const unbounded = () => core.flatMap(queue => make(queue, droppingStrategy()))(core.sync(() => MutableQueue.unbounded()));
const unbounded = () => core.flatMap(queue => make(backingQueueFromMutableQueue(queue), droppingStrategy()))(core.sync(() => MutableQueue.unbounded()));
/** @internal */

@@ -271,2 +278,31 @@ exports.unbounded = unbounded;

/** @internal */
exports.make = make;
class BackingQueueFromMutableQueue {
constructor(mutable) {
this.mutable = mutable;
}
poll(def) {
return MutableQueue.poll(this.mutable, def);
}
pollUpTo(limit) {
return MutableQueue.pollUpTo(this.mutable, limit);
}
offerAll(elements) {
return MutableQueue.offerAll(this.mutable, elements);
}
offer(element) {
return MutableQueue.offer(this.mutable, element);
}
capacity() {
return MutableQueue.capacity(this.mutable);
}
length() {
return MutableQueue.length(this.mutable);
}
}
/** @internal */
exports.BackingQueueFromMutableQueue = BackingQueueFromMutableQueue;
const backingQueueFromMutableQueue = mutable => new BackingQueueFromMutableQueue(mutable);
/** @internal */
exports.backingQueueFromMutableQueue = backingQueueFromMutableQueue;
const capacity = self => self.capacity();

@@ -356,3 +392,3 @@ /** @internal */

let keepPolling = true;
while (keepPolling && !MutableQueue.isFull(queue)) {
while (keepPolling && (queue.capacity() === Number.POSITIVE_INFINITY || queue.length() < queue.capacity())) {
const putter = MutableQueue.poll(MutableQueue.EmptyMutableQueue)(this.putters);

@@ -362,3 +398,3 @@ if (putter === MutableQueue.EmptyMutableQueue) {

} else {
const offered = MutableQueue.offer(putter[0])(queue);
const offered = queue.offer(putter[0]);
if (offered && putter[2]) {

@@ -439,8 +475,8 @@ unsafeCompleteDeferred(putter[1], true);

while (!(next = iterator.next()).done && offering) {
if (MutableQueue.capacity(queue) === 0) {
if (queue.capacity() === 0) {
return;
}
// Poll 1 and retry
MutableQueue.poll(MutableQueue.EmptyMutableQueue)(queue);
offering = MutableQueue.offer(next.value)(queue);
queue.poll(MutableQueue.EmptyMutableQueue);
offering = queue.offer(next.value);
}

@@ -475,6 +511,6 @@ }

let keepPolling = true;
while (keepPolling && !MutableQueue.isEmpty(queue)) {
while (keepPolling && queue.length() !== 0) {
const taker = MutableQueue.poll(MutableQueue.EmptyMutableQueue)(takers);
if (taker !== MutableQueue.EmptyMutableQueue) {
const element = MutableQueue.poll(MutableQueue.EmptyMutableQueue)(queue);
const element = queue.poll(MutableQueue.EmptyMutableQueue);
if (element !== MutableQueue.EmptyMutableQueue) {

@@ -481,0 +517,0 @@ unsafeCompleteDeferred(taker, element);

@@ -9,3 +9,3 @@ "use strict";

var Context = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Context"));
var DeterministicRandom = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/DeterministicRandom"));
var PCGRandom = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/PCGRandom"));
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/core"));

@@ -28,3 +28,3 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

this[_a] = RandomTypeId;
this.PRNG = new DeterministicRandom.PCGRandom(seed);
this.PRNG = new PCGRandom.PCGRandom(seed);
}

@@ -31,0 +31,0 @@ next() {

@@ -8,3 +8,3 @@ "use strict";

var Context = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Context"));
var _Global = /*#__PURE__*/require("@effect/data/Global");
var _GlobalValue = /*#__PURE__*/require("@effect/data/GlobalValue");
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/core"));

@@ -49,3 +49,3 @@ var effect = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/effect"));

exports.manual = manual;
const tagMap = /*#__PURE__*/(0, _Global.globalValue)( /*#__PURE__*/Symbol.for("@effect/io/Reloadable/tagMap"), () => new WeakMap([]));
const tagMap = /*#__PURE__*/(0, _GlobalValue.globalValue)( /*#__PURE__*/Symbol.for("@effect/io/Reloadable/tagMap"), () => new WeakMap([]));
/** @internal */

@@ -52,0 +52,0 @@ const reloadableTag = tag => {

@@ -10,5 +10,6 @@ "use strict";

var _Pipeable = /*#__PURE__*/require("@effect/data/Pipeable");
var Predicate = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Predicate"));
var Exit = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Exit"));
var Fiber = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Fiber"));
var FiberId = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Fiber/Id"));
var FiberId = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/FiberId"));
var FiberRefs = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/FiberRefs"));

@@ -108,3 +109,3 @@ var CausePretty = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/cause"));

/** @internal */
const isAsyncFiberException = u => typeof u === "object" && u !== null && "_tag" in u && u._tag === "AsyncFiberException" && "fiber" in u;
const isAsyncFiberException = u => Predicate.isTagged(u, "AsyncFiberException") && "fiber" in u;
/** @internal */

@@ -111,0 +112,0 @@ exports.isAsyncFiberException = isAsyncFiberException;

@@ -1,3 +0,3 @@

import type * as RuntimeFlags from "@effect/io/Fiber/Runtime/Flags";
import type * as RuntimeFlags from "@effect/io/RuntimeFlags";
export declare const windDown: (self: RuntimeFlags.RuntimeFlags) => boolean;
//# sourceMappingURL=runtimeFlags.d.ts.map

@@ -22,5 +22,5 @@ "use strict";

var Random = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Random"));
var ScheduleDecision = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Schedule/Decision"));
var Interval = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Schedule/Interval"));
var Intervals = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Schedule/Intervals"));
var ScheduleDecision = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/ScheduleDecision"));
var Interval = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/ScheduleInterval"));
var Intervals = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/ScheduleIntervals"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

@@ -35,3 +35,3 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

exports.ScheduleTypeId = ScheduleTypeId;
const ScheduleDriverSymbolKey = "@effect/io/Schedule/Driver";
const ScheduleDriverSymbolKey = "@effect/io/ScheduleDriver";
/** @internal */

@@ -38,0 +38,0 @@ const ScheduleDriverTypeId = /*#__PURE__*/Symbol.for(ScheduleDriverSymbolKey);

@@ -8,3 +8,3 @@ "use strict";

var Chunk = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Chunk"));
var Intervals = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Schedule/Intervals"));
var Intervals = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/ScheduleIntervals"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

@@ -11,0 +11,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

@@ -13,3 +13,3 @@ "use strict";

/** @internal */
const IntervalSymbolKey = "@effect/io/Schedule/Interval";
const IntervalSymbolKey = "@effect/io/ScheduleInterval";
/** @internal */

@@ -16,0 +16,0 @@ const IntervalTypeId = /*#__PURE__*/Symbol.for(IntervalSymbolKey);

@@ -10,7 +10,7 @@ "use strict";

var Option = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Option"));
var Interval = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Schedule/Interval"));
var Interval = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/ScheduleInterval"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/** @internal */
const IntervalsSymbolKey = "@effect/io/Schedule/Intervals";
const IntervalsSymbolKey = "@effect/io/ScheduleIntervals";
/** @internal */

@@ -17,0 +17,0 @@ const IntervalsTypeId = /*#__PURE__*/Symbol.for(IntervalsSymbolKey);

@@ -54,5 +54,2 @@ "use strict";

}
onRun(execution, fiber) {
return this.underlying.onRun(execution, fiber);
}
}

@@ -97,5 +94,2 @@ exports.ProxySupervisor = ProxySupervisor;

}
onRun(execution, fiber) {
return this.right.onRun(() => this.left.onRun(execution, fiber), fiber);
}
}

@@ -102,0 +96,0 @@ exports.Zip = Zip;

@@ -16,3 +16,3 @@ "use strict";

var Order = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Order"));
var FiberStatus = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Fiber/Status"));
var FiberStatus = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/FiberStatus"));
var clock = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/clock"));

@@ -19,0 +19,0 @@ var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/core"));

@@ -8,3 +8,3 @@ "use strict";

var Context = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Context"));
var _Global = /*#__PURE__*/require("@effect/data/Global");
var _GlobalValue = /*#__PURE__*/require("@effect/data/GlobalValue");
var MutableRef = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/MutableRef"));

@@ -29,3 +29,3 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

exports.tracerTag = tracerTag;
const ids = /*#__PURE__*/(0, _Global.globalValue)("@effect/io/Tracer/SpanId.ids", () => MutableRef.make(0));
const ids = /*#__PURE__*/(0, _GlobalValue.globalValue)("@effect/io/Tracer/SpanId.ids", () => MutableRef.make(0));
/** @internal */

@@ -67,5 +67,6 @@ class NativeSpan {

const nativeTracer = /*#__PURE__*/make({
span: (name, parent, context, links, startTime) => new NativeSpan(name, parent, context, links, startTime)
span: (name, parent, context, links, startTime) => new NativeSpan(name, parent, context, links, startTime),
context: f => f()
});
exports.nativeTracer = nativeTracer;
//# sourceMappingURL=tracer.js.map

@@ -11,7 +11,7 @@ /**

import type { Effect } from "@effect/io/Effect";
import type * as FiberId from "@effect/io/Fiber/Id";
import type * as FiberId from "@effect/io/FiberId";
import type * as FiberRefs from "@effect/io/FiberRefs";
import type * as Layer from "@effect/io/Layer";
import type * as LogLevel from "@effect/io/Logger/Level";
import type * as LogSpan from "@effect/io/Logger/Span";
import type * as LogLevel from "@effect/io/LogLevel";
import type * as LogSpan from "@effect/io/LogSpan";
import type { Scope } from "@effect/io/Scope";

@@ -18,0 +18,0 @@ /**

@@ -10,9 +10,9 @@ /**

import type * as Effect from "@effect/io/Effect";
import type * as MetricBoundaries from "@effect/io/Metric/Boundaries";
import type * as MetricKey from "@effect/io/Metric/Key";
import type * as MetricKeyType from "@effect/io/Metric/KeyType";
import type * as MetricLabel from "@effect/io/Metric/Label";
import type * as MetricPair from "@effect/io/Metric/Pair";
import type * as MetricRegistry from "@effect/io/Metric/Registry";
import type * as MetricState from "@effect/io/Metric/State";
import type * as MetricBoundaries from "@effect/io/MetricBoundaries";
import type * as MetricKey from "@effect/io/MetricKey";
import type * as MetricKeyType from "@effect/io/MetricKeyType";
import type * as MetricLabel from "@effect/io/MetricLabel";
import type * as MetricPair from "@effect/io/MetricPair";
import type * as MetricRegistry from "@effect/io/MetricRegistry";
import type * as MetricState from "@effect/io/MetricState";
/**

@@ -19,0 +19,0 @@ * @since 1.0.0

{
"name": "@effect/io",
"version": "0.38.2",
"version": "0.39.0",
"description": "Functional programming in TypeScript",

@@ -28,4 +28,4 @@ "license": "MIT",

"peerDependencies": {
"@effect/data": "^0.17.1"
"@effect/data": "^0.18.0"
}
}

@@ -125,2 +125,8 @@ /**

/**
* Retrieves the size of the queue, which is equal to the number of elements
* in the queue. This may be negative if fibers are suspended waiting for
* elements to be added to the queue. Returns None if shutdown has been called
*/
unsafeSize(): Option.Option<number>;
/**
* Returns `true` if the `Queue` contains at least one element, `false`

@@ -170,3 +176,3 @@ * otherwise.

*/
handleSurplus(iterable: Iterable<A>, queue: MutableQueue.MutableQueue<A>, takers: MutableQueue.MutableQueue<Deferred.Deferred<never, A>>, isShutdown: MutableRef.MutableRef<boolean>): Effect.Effect<never, never, boolean>;
handleSurplus(iterable: Iterable<A>, queue: BackingQueue<A>, takers: MutableQueue.MutableQueue<Deferred.Deferred<never, A>>, isShutdown: MutableRef.MutableRef<boolean>): Effect.Effect<never, never, boolean>;
/**

@@ -176,7 +182,45 @@ * Determines the behavior of the `Queue.Strategy` when the `Queue` has empty

*/
unsafeOnQueueEmptySpace(queue: MutableQueue.MutableQueue<A>, takers: MutableQueue.MutableQueue<Deferred.Deferred<never, A>>): void;
unsafeOnQueueEmptySpace(queue: BackingQueue<A>, takers: MutableQueue.MutableQueue<Deferred.Deferred<never, A>>): void;
}
/**
* @since 1.0.0
* @category models
*/
export interface BackingQueue<A> {
/**
* Dequeues an element from the queue.
* Returns either an element from the queue, or the `def` param.
*/
poll<Def>(def: Def): A | Def;
/**
* Dequeues up to `limit` elements from the queue.
*/
pollUpTo(limit: number): Chunk.Chunk<A>;
/**
* Enqueues a collection of values into the queue.
*
* Returns a `Chunk` of the values that were **not** able to be enqueued.
*/
offerAll(elements: Iterable<A>): Chunk.Chunk<A>;
/**
* Offers an element to the queue.
*
* Returns whether the enqueue was successful or not.
*/
offer(element: A): boolean;
/**
* The **maximum** number of elements that a queue can hold.
*
* **Note**: unbounded queues can still implement this interface with
* `capacity = Infinity`.
*/
capacity(): number;
/**
* Returns the number of elements currently in the queue
*/
length(): number;
}
/**
* @since 1.0.0
*/
export declare namespace Queue {

@@ -248,2 +292,7 @@ /**

/**
* @since 1.0.0
* @category constructors
*/
export declare const make: <A>(queue: BackingQueue<A>, strategy: Strategy<A>) => Effect.Effect<never, never, Queue<A>>;
/**
* Makes a new bounded `Queue`. When the capacity of the queue is reached, any

@@ -250,0 +299,0 @@ * additional calls to `offer` will be suspended until there is more room in

@@ -6,3 +6,3 @@ "use strict";

});
exports.unsafeOffer = exports.unbounded = exports.takeUpTo = exports.takeN = exports.takeBetween = exports.takeAll = exports.take = exports.slidingStrategy = exports.sliding = exports.size = exports.shutdown = exports.poll = exports.offerAll = exports.offer = exports.isShutdown = exports.isQueue = exports.isFull = exports.isEnqueue = exports.isEmpty = exports.isDequeue = exports.droppingStrategy = exports.dropping = exports.capacity = exports.bounded = exports.backPressureStrategy = exports.awaitShutdown = exports.QueueStrategyTypeId = exports.EnqueueTypeId = exports.DequeueTypeId = void 0;
exports.unsafeOffer = exports.unbounded = exports.takeUpTo = exports.takeN = exports.takeBetween = exports.takeAll = exports.take = exports.slidingStrategy = exports.sliding = exports.size = exports.shutdown = exports.poll = exports.offerAll = exports.offer = exports.make = exports.isShutdown = exports.isQueue = exports.isFull = exports.isEnqueue = exports.isEmpty = exports.isDequeue = exports.droppingStrategy = exports.dropping = exports.capacity = exports.bounded = exports.backPressureStrategy = exports.awaitShutdown = exports.QueueStrategyTypeId = exports.EnqueueTypeId = exports.DequeueTypeId = void 0;
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/queue"));

@@ -71,2 +71,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

/**
* @since 1.0.0
* @category constructors
*/
exports.slidingStrategy = slidingStrategy;
const make = internal.make;
/**
* Makes a new bounded `Queue`. When the capacity of the queue is reached, any

@@ -83,3 +89,3 @@ * additional calls to `offer` will be suspended until there is more room in

*/
exports.slidingStrategy = slidingStrategy;
exports.make = make;
const bounded = internal.bounded;

@@ -86,0 +92,0 @@ /**

@@ -29,2 +29,5 @@ /**

export declare namespace Ref {
/**
* @since 1.0.0
*/
interface Variance<A> {

@@ -31,0 +34,0 @@ readonly [RefTypeId]: {

@@ -11,3 +11,3 @@ /**

import type * as Exit from "@effect/io/Exit";
import type { FiberId } from "@effect/io/Fiber/Id";
import type { FiberId } from "@effect/io/FiberId";
/**

@@ -14,0 +14,0 @@ * @since 1.0.0

@@ -10,5 +10,5 @@ /**

import type * as Fiber from "@effect/io/Fiber";
import type * as FiberId from "@effect/io/Fiber/Id";
import type * as RuntimeFlags from "@effect/io/Fiber/Runtime/Flags";
import type * as FiberId from "@effect/io/FiberId";
import type * as FiberRefs from "@effect/io/FiberRefs";
import type * as RuntimeFlags from "@effect/io/RuntimeFlags";
import type { Scheduler } from "@effect/io/Scheduler";

@@ -15,0 +15,0 @@ /**

@@ -14,4 +14,4 @@ /**

import type * as Effect from "@effect/io/Effect";
import type * as ScheduleDecision from "@effect/io/Schedule/Decision";
import type * as Intervals from "@effect/io/Schedule/Intervals";
import type * as ScheduleDecision from "@effect/io/ScheduleDecision";
import type * as Intervals from "@effect/io/ScheduleIntervals";
/**

@@ -90,2 +90,5 @@ * @since 1.0.0

}
/**
* @since 1.0.0
*/
interface DriverVariance<Env, In, Out> {

@@ -92,0 +95,0 @@ readonly [ScheduleDriverTypeId]: {

@@ -7,3 +7,3 @@ "use strict";

exports.timerBatched = exports.timer = exports.makeMatrix = exports.makeBatched = exports.make = exports.defaultScheduler = exports.SyncScheduler = exports.PriorityBuckets = exports.MixedScheduler = exports.ControlledScheduler = void 0;
var _Global = /*#__PURE__*/require("@effect/data/Global");
var _GlobalValue = /*#__PURE__*/require("@effect/data/GlobalValue");
/**

@@ -116,3 +116,3 @@ * @since 1.0.0

exports.MixedScheduler = MixedScheduler;
const defaultScheduler = /*#__PURE__*/(0, _Global.globalValue)( /*#__PURE__*/Symbol.for("@effect/io/Scheduler/defaultScheduler"), () => new MixedScheduler(2048));
const defaultScheduler = /*#__PURE__*/(0, _GlobalValue.globalValue)( /*#__PURE__*/Symbol.for("@effect/io/Scheduler/defaultScheduler"), () => new MixedScheduler(2048));
/**

@@ -119,0 +119,0 @@ * @since 1.0.0

@@ -31,3 +31,3 @@ /**

import type { Predicate } from "@effect/data/Predicate"
import type * as FiberId from "@effect/io/Fiber/Id"
import type * as FiberId from "@effect/io/FiberId"
import * as internal from "@effect/io/internal/cause"

@@ -801,3 +801,3 @@ import type { Span } from "@effect/io/Tracer"

* otherwise.
*
* @since 1.0.0

@@ -821,3 +821,3 @@ * @category refinements

* otherwise.
*
* @since 1.0.0

@@ -840,8 +840,8 @@ * @category refinements

/**
* Returns `true` if the specified value is an `IllegalArgumentException`, `false`
* otherwise.
* @since 1.0.0
* @category refinements
*/
* Returns `true` if the specified value is an `NoSuchElementException`, `false`
* otherwise.
*
* @since 1.0.0
* @category refinements
*/
export const isNoSuchElementException: (u: unknown) => u is NoSuchElementException = internal.isNoSuchElementException

@@ -858,8 +858,8 @@

/**
* Returns `true` if the specified value is an `RuntimeException`, `false`
* otherwise.
* @since 1.0.0
* @category refinements
*/
* Returns `true` if the specified value is an `RuntimeException`, `false`
* otherwise.
*
* @since 1.0.0
* @category refinements
*/
export const isRuntimeException: (u: unknown) => u is RuntimeException = internal.isRuntimeException

@@ -866,0 +866,0 @@

@@ -12,6 +12,6 @@ /**

import type { Predicate, Refinement } from "@effect/data/Predicate"
import type * as ConfigError from "@effect/io/Config/Error"
import type * as ConfigSecret from "@effect/io/Config/Secret"
import type * as ConfigError from "@effect/io/ConfigError"
import type * as ConfigSecret from "@effect/io/ConfigSecret"
import * as internal from "@effect/io/internal/config"
import type * as LogLevel from "@effect/io/Logger/Level"
import type * as LogLevel from "@effect/io/LogLevel"

@@ -18,0 +18,0 @@ /**

@@ -49,7 +49,31 @@ /**

warn(...args: ReadonlyArray<any>): Effect<never, never, void>
withGroup<R, E, A>(self: Effect<R, E, A>, options?: {
readonly unsafe: UnsafeConsole
}
/**
* @since 1.0.0
* @category model
*/
export interface UnsafeConsole {
assert(condition: boolean, ...args: ReadonlyArray<any>): void
clear(): void
count(label?: string): void
countReset(label?: string): void
debug(...args: ReadonlyArray<any>): void
dir(item: any, options?: any): void
dirxml(...args: ReadonlyArray<any>): void
error(...args: ReadonlyArray<any>): void
group(options?: {
readonly label?: string
readonly collapsed?: boolean
}): Effect<R, E, A>
withTime<R, E, A>(self: Effect<R, E, A>, label?: string): Effect<R, E, A>
}): void
groupEnd(): void
info(...args: ReadonlyArray<any>): void
log(...args: ReadonlyArray<any>): void
table(tabularData: any, properties?: ReadonlyArray<string>): void
time(label?: string): void
timeEnd(label?: string): void
timeLog(label?: string, ...args: ReadonlyArray<any>): void
trace(...args: ReadonlyArray<any>): void
warn(...args: ReadonlyArray<any>): void
}

@@ -56,0 +80,0 @@

@@ -6,3 +6,3 @@ /**

import type * as Clock from "@effect/io/Clock"
import type * as ConfigProvider from "@effect/io/Config/Provider"
import type * as ConfigProvider from "@effect/io/ConfigProvider"
import type * as Console from "@effect/io/Console"

@@ -9,0 +9,0 @@ import type * as FiberRef from "@effect/io/FiberRef"

@@ -11,3 +11,3 @@ /**

import type * as Exit from "@effect/io/Exit"
import type * as FiberId from "@effect/io/Fiber/Id"
import type * as FiberId from "@effect/io/FiberId"
import * as core from "@effect/io/internal/core"

@@ -14,0 +14,0 @@ import * as internal from "@effect/io/internal/deferred"

@@ -11,3 +11,3 @@ /**

import type * as Effect from "@effect/io/Effect"
import type * as FiberId from "@effect/io/Fiber/Id"
import type * as FiberId from "@effect/io/FiberId"
import * as core from "@effect/io/internal/core"

@@ -14,0 +14,0 @@

@@ -12,6 +12,5 @@ /**

import type * as Exit from "@effect/io/Exit"
import type * as FiberId from "@effect/io/Fiber/Id"
import type * as RuntimeFlags from "@effect/io/Fiber/Runtime/Flags"
import type * as FiberStatus from "@effect/io/Fiber/Status"
import type * as FiberId from "@effect/io/FiberId"
import type * as FiberRefs from "@effect/io/FiberRefs"
import type * as FiberStatus from "@effect/io/FiberStatus"
import * as core from "@effect/io/internal/core"

@@ -21,2 +20,3 @@ import * as circular from "@effect/io/internal/effect/circular"

import * as fiberRuntime from "@effect/io/internal/fiberRuntime"
import type * as RuntimeFlags from "@effect/io/RuntimeFlags"
import type * as Scope from "@effect/io/Scope"

@@ -172,2 +172,5 @@

/**
* @since 1.0.0
*/
export interface RuntimeVariance<E, A> {

@@ -174,0 +177,0 @@ readonly [RuntimeFiberTypeId]: {

@@ -15,3 +15,2 @@ /**

import type * as Effect from "@effect/io/Effect"
import type * as RuntimeFlags from "@effect/io/Fiber/Runtime/Flags"
import * as core from "@effect/io/internal/core"

@@ -21,6 +20,7 @@ import * as fiberRuntime from "@effect/io/internal/fiberRuntime"

import type * as Logger from "@effect/io/Logger"
import type * as LogLevel from "@effect/io/Logger/Level"
import type * as LogSpan from "@effect/io/Logger/Span"
import type * as MetricLabel from "@effect/io/Metric/Label"
import type * as LogLevel from "@effect/io/LogLevel"
import type * as LogSpan from "@effect/io/LogSpan"
import type * as MetricLabel from "@effect/io/MetricLabel"
import type * as Request from "@effect/io/Request"
import type * as RuntimeFlags from "@effect/io/RuntimeFlags"
import type * as Scheduler from "@effect/io/Scheduler"

@@ -27,0 +27,0 @@ import type * as Scope from "@effect/io/Scope"

@@ -9,3 +9,3 @@ /**

import type * as Effect from "@effect/io/Effect"
import type * as FiberId from "@effect/io/Fiber/Id"
import type * as FiberId from "@effect/io/FiberId"
import type * as FiberRef from "@effect/io/FiberRef"

@@ -12,0 +12,0 @@ import * as internal from "@effect/io/internal/fiberRefs"

@@ -7,3 +7,3 @@ import * as Either from "@effect/data/Either"

import type * as Deferred from "@effect/io/Deferred"
import type { FiberId } from "@effect/io/Fiber/Id"
import type { FiberId } from "@effect/io/FiberId"
import type * as Request from "@effect/io/Request"

@@ -10,0 +10,0 @@ import type * as RequestBlock from "@effect/io/RequestBlock"

@@ -17,3 +17,3 @@ import * as Context from "@effect/data/Context"

import * as Exit from "@effect/io/Exit"
import type * as FiberId from "@effect/io/Fiber/Id"
import type * as FiberId from "@effect/io/FiberId"
import * as core from "@effect/io/internal/core"

@@ -20,0 +20,0 @@ import * as effect from "@effect/io/internal/effect"

@@ -11,3 +11,3 @@ import * as Chunk from "@effect/data/Chunk"

import type * as Cause from "@effect/io/Cause"
import * as FiberId from "@effect/io/Fiber/Id"
import * as FiberId from "@effect/io/FiberId"
import * as OpCodes from "@effect/io/internal/opCodes/cause"

@@ -14,0 +14,0 @@

@@ -1,2 +0,2 @@

import { globalValue } from "@effect/data/Global"
import { globalValue } from "@effect/data/GlobalValue"
import { fiberRefUnsafeMake } from "@effect/io/internal/core"

@@ -3,0 +3,0 @@ import type * as Request from "@effect/io/Request"

@@ -11,4 +11,4 @@ import * as Chunk from "@effect/data/Chunk"

import type * as Config from "@effect/io/Config"
import * as ConfigError from "@effect/io/Config/Error"
import type * as ConfigSecret from "@effect/io/Config/Secret"
import * as ConfigError from "@effect/io/ConfigError"
import type * as ConfigSecret from "@effect/io/ConfigSecret"
import * as configError from "@effect/io/internal/configError"

@@ -18,3 +18,3 @@ import * as configSecret from "@effect/io/internal/configSecret"

import * as OpCodes from "@effect/io/internal/opCodes/config"
import type * as LogLevel from "@effect/io/Logger/Level"
import type * as LogLevel from "@effect/io/LogLevel"

@@ -21,0 +21,0 @@ /** @internal */

@@ -5,7 +5,7 @@ import * as Either from "@effect/data/Either"

import type * as Cause from "@effect/io/Cause"
import type * as ConfigError from "@effect/io/Config/Error"
import type * as ConfigError from "@effect/io/ConfigError"
import * as OpCodes from "@effect/io/internal/opCodes/configError"
/** @internal */
const ConfigErrorSymbolKey = "@effect/io/Config/Error"
const ConfigErrorSymbolKey = "@effect/io/ConfigError"

@@ -12,0 +12,0 @@ /** @internal */

@@ -12,5 +12,5 @@ import * as Context from "@effect/data/Context"

import type * as Config from "@effect/io/Config"
import type * as ConfigError from "@effect/io/Config/Error"
import type * as ConfigProvider from "@effect/io/Config/Provider"
import type * as PathPatch from "@effect/io/Config/Provider/PathPatch"
import type * as ConfigError from "@effect/io/ConfigError"
import type * as ConfigProvider from "@effect/io/ConfigProvider"
import type * as PathPatch from "@effect/io/ConfigProviderPathPatch"
import type * as Effect from "@effect/io/Effect"

@@ -27,3 +27,3 @@ import * as _config from "@effect/io/internal/config"

/** @internal */
const ConfigProviderSymbolKey = "@effect/io/Config/Provider"
const ConfigProviderSymbolKey = "@effect/io/ConfigProvider"

@@ -41,3 +41,3 @@ /** @internal */

/** @internal */
const FlatConfigProviderSymbolKey = "@effect/io/Config/Provider/Flat"
const FlatConfigProviderSymbolKey = "@effect/io/ConfigProviderFlat"

@@ -155,3 +155,3 @@ /** @internal */

): ConfigProvider.ConfigProvider => {
const { pathDelim, seqDelim } = Object.assign({}, { seqDelim: ",", pathDelim: "." }, config)
const { pathDelim, seqDelim } = Object.assign({ seqDelim: ",", pathDelim: "." }, config)
const makePathString = (path: ReadonlyArray<string>): string => pipe(path, RA.join(pathDelim))

@@ -158,0 +158,0 @@ const unmakePathString = (pathString: string): ReadonlyArray<string> => pathString.split(pathDelim)

@@ -6,4 +6,4 @@ import * as Either from "@effect/data/Either"

import * as RA from "@effect/data/ReadonlyArray"
import type * as ConfigError from "@effect/io/Config/Error"
import type * as PathPatch from "@effect/io/Config/Provider/PathPatch"
import type * as ConfigError from "@effect/io/ConfigError"
import type * as PathPatch from "@effect/io/ConfigProviderPathPatch"
import * as configError from "@effect/io/internal/configError"

@@ -10,0 +10,0 @@

@@ -5,6 +5,6 @@ import * as Chunk from "@effect/data/Chunk"

import * as Hash from "@effect/data/Hash"
import type * as ConfigSecret from "@effect/io/Config/Secret"
import type * as ConfigSecret from "@effect/io/ConfigSecret"
/** @internal */
const ConfigSecretSymbolKey = "@effect/io/Config/Secret"
const ConfigSecretSymbolKey = "@effect/io/ConfigSecret"

@@ -11,0 +11,0 @@ /** @internal */

@@ -116,3 +116,10 @@ import * as Context from "@effect/data/Context"

) => Effect.Effect<R, E, A>
>((args) => core.isEffect(args[0]), (self, options) => consoleWith((_) => _.withGroup(self, options)))
>((args) => core.isEffect(args[0]), (self, options) =>
consoleWith((_) =>
core.acquireUseRelease(
_.group(options),
() => self,
() => _.groupEnd
)
))

@@ -123,2 +130,9 @@ /** @internal */

<R, E, A>(self: Effect.Effect<R, E, A>, label?: string) => Effect.Effect<R, E, A>
>((args) => core.isEffect(args[0]), (self, label) => consoleWith((_) => _.withTime(self, label)))
>((args) => core.isEffect(args[0]), (self, label) =>
consoleWith((_) =>
core.acquireUseRelease(
_.time(label),
() => self,
() => _.timeEnd(label)
)
))

@@ -7,3 +7,3 @@ import type * as Chunk from "@effect/data/Chunk"

import type * as Config from "@effect/io/Config"
import type * as ConfigProvider from "@effect/io/Config/Provider"
import type * as ConfigProvider from "@effect/io/ConfigProvider"
import type * as DefaultServices from "@effect/io/DefaultServices"

@@ -10,0 +10,0 @@ import type * as Effect from "@effect/io/Effect"

@@ -96,18 +96,3 @@ import * as Context from "@effect/data/Context"

},
withGroup(self, options) {
return core.acquireUseRelease(
options?.collapsed ?
core.sync(() => console.groupCollapsed(options?.label)) :
core.sync(() => console.group(options?.label)),
() => self,
() => core.sync(() => console.groupEnd())
)
},
withTime(self, label) {
return core.acquireUseRelease(
core.sync(() => console.time(label)),
() => self,
() => core.sync(() => console.timeEnd(label))
)
}
unsafe: console
}

@@ -17,4 +17,4 @@ import * as Duration from "@effect/data/Duration"

import type * as Fiber from "@effect/io/Fiber"
import * as FiberId from "@effect/io/Fiber/Id"
import type * as FiberRefsPatch from "@effect/io/FiberRefs/Patch"
import * as FiberId from "@effect/io/FiberId"
import type * as FiberRefsPatch from "@effect/io/FiberRefsPatch"
import * as internalCause from "@effect/io/internal/cause"

@@ -31,6 +31,6 @@ import * as core from "@effect/io/internal/core"

import type * as Ref from "@effect/io/Ref"
import type * as Synchronized from "@effect/io/Ref/Synchronized"
import type * as Schedule from "@effect/io/Schedule"
import type * as Scope from "@effect/io/Scope"
import type * as Supervisor from "@effect/io/Supervisor"
import type * as Synchronized from "@effect/io/SynchronizedRef"

@@ -162,3 +162,3 @@ /** @internal */

timeToLive: Duration.DurationInput,
cache: Synchronized.Synchronized<Option.Option<readonly [number, Deferred.Deferred<E, A>]>>
cache: Synchronized.SynchronizedRef<Option.Option<readonly [number, Deferred.Deferred<E, A>]>>
): Effect.Effect<R, E, A> =>

@@ -195,3 +195,3 @@ core.uninterruptibleMask<R, E, A>((restore) =>

const invalidateCache = <E, A>(
cache: Synchronized.Synchronized<Option.Option<readonly [number, Deferred.Deferred<E, A>]>>
cache: Synchronized.SynchronizedRef<Option.Option<readonly [number, Deferred.Deferred<E, A>]>>
): Effect.Effect<never, never, void> => internalRef.set(cache, Option.none())

@@ -523,8 +523,8 @@

/** @internal */
const SynchronizedSymbolKey = "@effect/io/Ref/Synchronized"
const SynchronizedSymbolKey = "@effect/io/Ref/SynchronizedRef"
/** @internal */
export const SynchronizedTypeId: Synchronized.SynchronizedTypeId = Symbol.for(
export const SynchronizedTypeId: Synchronized.SynchronizedRefTypeId = Symbol.for(
SynchronizedSymbolKey
) as Synchronized.SynchronizedTypeId
) as Synchronized.SynchronizedRefTypeId

@@ -537,3 +537,3 @@ /** @internal */

/** @internal */
class SynchronizedImpl<A> implements Synchronized.Synchronized<A> {
class SynchronizedImpl<A> implements Synchronized.SynchronizedRef<A> {
readonly [SynchronizedTypeId] = synchronizedVariance

@@ -562,7 +562,7 @@ readonly [internalRef.RefTypeId] = internalRef.refVariance

/** @internal */
export const makeSynchronized = <A>(value: A): Effect.Effect<never, never, Synchronized.Synchronized<A>> =>
export const makeSynchronized = <A>(value: A): Effect.Effect<never, never, Synchronized.SynchronizedRef<A>> =>
core.sync(() => unsafeMakeSynchronized(value))
/** @internal */
export const unsafeMakeSynchronized = <A>(value: A): Synchronized.Synchronized<A> => {
export const unsafeMakeSynchronized = <A>(value: A): Synchronized.SynchronizedRef<A> => {
const ref = internalRef.unsafeMake(value)

@@ -577,5 +577,5 @@ const sem = unsafeMakeSemaphore(1)

pf: (a: A) => Option.Option<Effect.Effect<R, E, A>>
) => (self: Synchronized.Synchronized<A>) => Effect.Effect<R, E, A>,
) => (self: Synchronized.SynchronizedRef<A>) => Effect.Effect<R, E, A>,
<A, R, E>(
self: Synchronized.Synchronized<A>,
self: Synchronized.SynchronizedRef<A>,
pf: (a: A) => Option.Option<Effect.Effect<R, E, A>>

@@ -582,0 +582,0 @@ ) => Effect.Effect<R, E, A>

@@ -13,4 +13,4 @@ import * as Either from "@effect/data/Either"

import type * as Fiber from "@effect/io/Fiber"
import * as FiberId from "@effect/io/Fiber/Id"
import * as FiberStatus from "@effect/io/Fiber/Status"
import * as FiberId from "@effect/io/FiberId"
import * as FiberStatus from "@effect/io/FiberStatus"
import * as core from "@effect/io/internal/core"

@@ -347,3 +347,3 @@ import * as fiberScope from "@effect/io/internal/fiberScope"

/** @internal */
export const currentFiberURI = "@effect/io/Fiber/Current"
export const currentFiberURI = "@effect/io/FiberCurrent"

@@ -350,0 +350,0 @@ /** @internal */

import * as Equal from "@effect/data/Equal"
import { dual, pipe } from "@effect/data/Function"
import { globalValue } from "@effect/data/Global"
import { globalValue } from "@effect/data/GlobalValue"
import * as Hash from "@effect/data/Hash"

@@ -8,6 +8,6 @@ import * as HashSet from "@effect/data/HashSet"

import * as Option from "@effect/data/Option"
import type * as FiberId from "@effect/io/Fiber/Id"
import type * as FiberId from "@effect/io/FiberId"
/** @internal */
const FiberIdSymbolKey = "@effect/io/Fiber/Id"
const FiberIdSymbolKey = "@effect/io/FiberId"

@@ -14,0 +14,0 @@ /** @internal */

import type * as Cause from "@effect/io/Cause"
import type * as Effect from "@effect/io/Effect"
import type * as FiberStatus from "@effect/io/Fiber/Status"
import type * as FiberStatus from "@effect/io/FiberStatus"
import type * as FiberRuntime from "@effect/io/internal/fiberRuntime"

@@ -5,0 +5,0 @@

@@ -8,3 +8,3 @@ import * as Equal from "@effect/data/Equal"

import type * as Effect from "@effect/io/Effect"
import type * as FiberId from "@effect/io/Fiber/Id"
import type * as FiberId from "@effect/io/FiberId"
import type * as FiberRef from "@effect/io/FiberRef"

@@ -11,0 +11,0 @@ import type * as FiberRefs from "@effect/io/FiberRefs"

import { equals } from "@effect/data/Equal"
import { dual } from "@effect/data/Function"
import * as Arr from "@effect/data/ReadonlyArray"
import type * as FiberId from "@effect/io/Fiber/Id"
import type * as FiberId from "@effect/io/FiberId"
import type * as FiberRefs from "@effect/io/FiberRefs"
import type * as FiberRefsPatch from "@effect/io/FiberRefs/Patch"
import type * as FiberRefsPatch from "@effect/io/FiberRefsPatch"
import * as _fiberRefs from "@effect/io/internal/fiberRefs"

@@ -8,0 +8,0 @@

@@ -1,10 +0,10 @@

import { globalValue } from "@effect/data/Global"
import * as FiberId from "@effect/io/Fiber/Id"
import type * as RuntimeFlags from "@effect/io/Fiber/Runtime/Flags"
import { globalValue } from "@effect/data/GlobalValue"
import * as FiberId from "@effect/io/FiberId"
import * as FiberMessage from "@effect/io/internal/fiberMessage"
import type * as FiberRuntime from "@effect/io/internal/fiberRuntime"
import * as _runtimeFlags from "@effect/io/internal/runtimeFlags"
import type * as RuntimeFlags from "@effect/io/RuntimeFlags"
/** @internal */
const FiberScopeSymbolKey = "@effect/io/Fiber/Scope"
const FiberScopeSymbolKey = "@effect/io/FiberScope"

@@ -11,0 +11,0 @@ /** @internal */

import * as Equal from "@effect/data/Equal"
import { pipe } from "@effect/data/Function"
import * as Hash from "@effect/data/Hash"
import type { FiberId } from "@effect/io/Fiber/Id"
import type { RuntimeFlags } from "@effect/io/Fiber/Runtime/Flags"
import type * as FiberStatus from "@effect/io/Fiber/Status"
import type { FiberId } from "@effect/io/FiberId"
import type * as FiberStatus from "@effect/io/FiberStatus"
import type { RuntimeFlags } from "@effect/io/RuntimeFlags"
const FiberStatusSymbolKey = "@effect/io/Fiber/Status"
const FiberStatusSymbolKey = "@effect/io/FiberStatus"

@@ -10,0 +10,0 @@ /** @internal */

@@ -5,2 +5,3 @@ import * as Chunk from "@effect/data/Chunk"

import * as MutableRef from "@effect/data/MutableRef"
import * as Option from "@effect/data/Option"
import { pipeArguments } from "@effect/data/Pipeable"

@@ -852,2 +853,9 @@ import type * as Deferred from "@effect/io/Deferred"

unsafeSize(): Option.Option<number> {
if (MutableRef.get(this.shutdownFlag)) {
return Option.none()
}
return Option.some(this.subscription.size())
}
isFull(): Effect.Effect<never, never, boolean> {

@@ -1014,2 +1022,9 @@ return core.map(this.size(), (size) => size === this.capacity())

unsafeSize(): Option.Option<number> {
if (MutableRef.get(this.shutdownFlag)) {
return Option.none()
}
return Option.some(this.hub.size())
}
isFull(): Effect.Effect<never, never, boolean> {

@@ -1016,0 +1031,0 @@ return core.map(this.size(), (size) => size === this.capacity())

@@ -9,2 +9,3 @@ import * as Duration from "@effect/data/Duration"

import { pipeArguments } from "@effect/data/Pipeable"
import * as Predicate from "@effect/data/Predicate"
import type * as Deferred from "@effect/io/Deferred"

@@ -71,3 +72,3 @@ import type * as Effect from "@effect/io/Effect"

const isComplete = (u: unknown): u is Complete<unknown, unknown> =>
typeof u === "object" && u != null && KeyedPoolMapValueSymbol in u && "_tag" in u && u["_tag"] === "Complete"
Predicate.isTagged(u, "Complete") && KeyedPoolMapValueSymbol in u

@@ -90,3 +91,3 @@ class Pending<E, A> implements Equal.Equal {

const isPending = (u: unknown): u is Pending<unknown, unknown> =>
typeof u === "object" && u != null && KeyedPoolMapValueSymbol in u && "_tag" in u && u["_tag"] === "Pending"
Predicate.isTagged(u, "Pending") && KeyedPoolMapValueSymbol in u

@@ -93,0 +94,0 @@ const makeImpl = <K, R, E, A>(

@@ -11,3 +11,3 @@ import * as Context from "@effect/data/Context"

import type { FiberRef } from "@effect/io/FiberRef"
import type * as FiberRefsPatch from "@effect/io/FiberRefs/Patch"
import type * as FiberRefsPatch from "@effect/io/FiberRefsPatch"
import * as core from "@effect/io/internal/core"

@@ -23,8 +23,8 @@ import * as effect from "@effect/io/internal/effect"

import type * as Layer from "@effect/io/Layer"
import type * as Synchronized from "@effect/io/Ref/Synchronized"
import type * as Runtime from "@effect/io/Runtime"
import type * as Schedule from "@effect/io/Schedule"
import * as ScheduleDecision from "@effect/io/Schedule/Decision"
import * as Intervals from "@effect/io/Schedule/Intervals"
import * as ScheduleDecision from "@effect/io/ScheduleDecision"
import * as Intervals from "@effect/io/ScheduleIntervals"
import * as Scope from "@effect/io/Scope"
import type * as Synchronized from "@effect/io/SynchronizedRef"

@@ -173,3 +173,3 @@ /** @internal */

constructor(
readonly ref: Synchronized.Synchronized<
readonly ref: Synchronized.SynchronizedRef<
Map<

@@ -176,0 +176,0 @@ Layer.Layer<any, any, any>,

import type * as Context from "@effect/data/Context"
import { dual } from "@effect/data/Function"
import * as HashSet from "@effect/data/HashSet"
import type * as ConfigProvider from "@effect/io/Config/Provider"
import type * as ConfigProvider from "@effect/io/ConfigProvider"
import type * as Effect from "@effect/io/Effect"

@@ -14,3 +14,3 @@ import * as core from "@effect/io/internal/core"

import type * as Logger from "@effect/io/Logger"
import type * as LogLevel from "@effect/io/Logger/Level"
import type * as LogLevel from "@effect/io/LogLevel"
import type { Scope } from "@effect/io/Scope"

@@ -17,0 +17,0 @@ import type * as Supervisor from "@effect/io/Supervisor"

@@ -8,3 +8,3 @@ import type { LazyArg } from "@effect/data/Function"

import type * as CauseExt from "@effect/io/Cause"
import type * as FiberId from "@effect/io/Fiber/Id"
import type * as FiberId from "@effect/io/FiberId"
import type * as FiberRefs from "@effect/io/FiberRefs"

@@ -14,4 +14,4 @@ import * as Cause from "@effect/io/internal/cause"

import type * as Logger from "@effect/io/Logger"
import type * as LogLevel from "@effect/io/Logger/Level"
import * as LogSpan from "@effect/io/Logger/Span"
import type * as LogLevel from "@effect/io/LogLevel"
import * as LogSpan from "@effect/io/LogSpan"

@@ -18,0 +18,0 @@ /** @internal */

@@ -1,2 +0,2 @@

import type * as LogSpan from "@effect/io/Logger/Span"
import type * as LogSpan from "@effect/io/LogSpan"

@@ -3,0 +3,0 @@ /** @internal */

@@ -5,3 +5,3 @@ import type * as Chunk from "@effect/data/Chunk"

import { constVoid, dual, identity, pipe } from "@effect/data/Function"
import { globalValue } from "@effect/data/Global"
import { globalValue } from "@effect/data/GlobalValue"
import * as HashSet from "@effect/data/HashSet"

@@ -20,10 +20,10 @@ import { pipeArguments } from "@effect/data/Pipeable"

import type * as Metric from "@effect/io/Metric"
import type * as MetricBoundaries from "@effect/io/Metric/Boundaries"
import type * as MetricHook from "@effect/io/Metric/Hook"
import type * as MetricKey from "@effect/io/Metric/Key"
import type * as MetricKeyType from "@effect/io/Metric/KeyType"
import type * as MetricLabel from "@effect/io/Metric/Label"
import type * as MetricPair from "@effect/io/Metric/Pair"
import type * as MetricRegistry from "@effect/io/Metric/Registry"
import type * as MetricState from "@effect/io/Metric/State"
import type * as MetricBoundaries from "@effect/io/MetricBoundaries"
import type * as MetricHook from "@effect/io/MetricHook"
import type * as MetricKey from "@effect/io/MetricKey"
import type * as MetricKeyType from "@effect/io/MetricKeyType"
import type * as MetricLabel from "@effect/io/MetricLabel"
import type * as MetricPair from "@effect/io/MetricPair"
import type * as MetricRegistry from "@effect/io/MetricRegistry"
import type * as MetricState from "@effect/io/MetricState"

@@ -30,0 +30,0 @@ /** @internal */

@@ -7,6 +7,6 @@ import * as Chunk from "@effect/data/Chunk"

import * as ReadonlyArray from "@effect/data/ReadonlyArray"
import type * as MetricBoundaries from "@effect/io/Metric/Boundaries"
import type * as MetricBoundaries from "@effect/io/MetricBoundaries"
/** @internal */
const MetricBoundariesSymbolKey = "@effect/io/Metric/Boundaries"
const MetricBoundariesSymbolKey = "@effect/io/MetricBoundaries"

@@ -13,0 +13,0 @@ /** @internal */

@@ -11,7 +11,7 @@ import * as Chunk from "@effect/data/Chunk"

import * as metricState from "@effect/io/internal/metric/state"
import type * as MetricHook from "@effect/io/Metric/Hook"
import type * as MetricKey from "@effect/io/Metric/Key"
import type * as MetricHook from "@effect/io/MetricHook"
import type * as MetricKey from "@effect/io/MetricKey"
/** @internal */
const MetricHookSymbolKey = "@effect/io/Metric/Hook"
const MetricHookSymbolKey = "@effect/io/MetricHook"

@@ -18,0 +18,0 @@ /** @internal */

@@ -11,9 +11,9 @@ import type * as Chunk from "@effect/data/Chunk"

import * as metricLabel from "@effect/io/internal/metric/label"
import type * as MetricBoundaries from "@effect/io/Metric/Boundaries"
import type * as MetricKey from "@effect/io/Metric/Key"
import type * as MetricKeyType from "@effect/io/Metric/KeyType"
import type * as MetricLabel from "@effect/io/Metric/Label"
import type * as MetricBoundaries from "@effect/io/MetricBoundaries"
import type * as MetricKey from "@effect/io/MetricKey"
import type * as MetricKeyType from "@effect/io/MetricKeyType"
import type * as MetricLabel from "@effect/io/MetricLabel"
/** @internal */
const MetricKeySymbolKey = "@effect/io/Metric/Key"
const MetricKeySymbolKey = "@effect/io/MetricKey"

@@ -20,0 +20,0 @@ /** @internal */

@@ -7,7 +7,7 @@ import type * as Chunk from "@effect/data/Chunk"

import { pipeArguments } from "@effect/data/Pipeable"
import type * as MetricBoundaries from "@effect/io/Metric/Boundaries"
import type * as MetricKeyType from "@effect/io/Metric/KeyType"
import type * as MetricBoundaries from "@effect/io/MetricBoundaries"
import type * as MetricKeyType from "@effect/io/MetricKeyType"
/** @internal */
const MetricKeyTypeSymbolKey = "@effect/io/Metric/KeyType"
const MetricKeyTypeSymbolKey = "@effect/io/MetricKeyType"

@@ -20,3 +20,3 @@ /** @internal */

/** @internal */
const CounterKeyTypeSymbolKey = "effect/io/Metric/KeyType/Counter"
const CounterKeyTypeSymbolKey = "effect/io/MetricKeyTypeCounter"

@@ -29,3 +29,3 @@ /** @internal */

/** @internal */
const FrequencyKeyTypeSymbolKey = "effect/io/Metric/KeyType/Frequency"
const FrequencyKeyTypeSymbolKey = "effect/io/MetricKeyTypeFrequency"

@@ -38,3 +38,3 @@ /** @internal */

/** @internal */
const GaugeKeyTypeSymbolKey = "effect/io/Metric/KeyType/Gauge"
const GaugeKeyTypeSymbolKey = "effect/io/MetricKeyTypeGauge"

@@ -47,3 +47,3 @@ /** @internal */

/** @internal */
const HistogramKeyTypeSymbolKey = "effect/io/Metric/KeyType/Histogram"
const HistogramKeyTypeSymbolKey = "effect/io/MetricKeyTypeHistogram"

@@ -56,3 +56,3 @@ /** @internal */

/** @internal */
const SummaryKeyTypeSymbolKey = "effect/io/Metric/KeyType/Summary"
const SummaryKeyTypeSymbolKey = "effect/io/MetricKeyTypeSummary"

@@ -59,0 +59,0 @@ /** @internal */

@@ -5,6 +5,6 @@ import * as Equal from "@effect/data/Equal"

import { pipeArguments } from "@effect/data/Pipeable"
import type * as MetricLabel from "@effect/io/Metric/Label"
import type * as MetricLabel from "@effect/io/MetricLabel"
/** @internal */
const MetricLabelSymbolKey = "@effect/io/Metric/Label"
const MetricLabelSymbolKey = "@effect/io/MetricLabel"

@@ -11,0 +11,0 @@ /** @internal */

import { pipeArguments } from "@effect/data/Pipeable"
import type * as MetricKey from "@effect/io/Metric/Key"
import type * as MetricKeyType from "@effect/io/Metric/KeyType"
import type * as MetricPair from "@effect/io/Metric/Pair"
import type * as MetricState from "@effect/io/Metric/State"
import type * as MetricKey from "@effect/io/MetricKey"
import type * as MetricKeyType from "@effect/io/MetricKeyType"
import type * as MetricPair from "@effect/io/MetricPair"
import type * as MetricState from "@effect/io/MetricState"
/** @internal */
const MetricPairSymbolKey = "@effect/io/Metric/Pair"
const MetricPairSymbolKey = "@effect/io/MetricPair"

@@ -10,0 +10,0 @@ /** @internal */

@@ -10,3 +10,3 @@ import { dual, pipe } from "@effect/data/Function"

import type * as Metric from "@effect/io/Metric"
import type * as PollingMetric from "@effect/io/Metric/Polling"
import type * as PollingMetric from "@effect/io/MetricPolling"
import type * as Schedule from "@effect/io/Schedule"

@@ -16,3 +16,3 @@ import type * as Scope from "@effect/io/Scope"

/** @internal */
const PollingMetricSymbolKey = "@effect/io/Metric/Polling"
const PollingMetricSymbolKey = "@effect/io/MetricPolling"

@@ -19,0 +19,0 @@ /** @internal */

@@ -8,10 +8,10 @@ import { pipe } from "@effect/data/Function"

import * as metricPair from "@effect/io/internal/metric/pair"
import type * as MetricHook from "@effect/io/Metric/Hook"
import type * as MetricKey from "@effect/io/Metric/Key"
import type * as MetricKeyType from "@effect/io/Metric/KeyType"
import type * as MetricPair from "@effect/io/Metric/Pair"
import type * as MetricRegistry from "@effect/io/Metric/Registry"
import type * as MetricHook from "@effect/io/MetricHook"
import type * as MetricKey from "@effect/io/MetricKey"
import type * as MetricKeyType from "@effect/io/MetricKeyType"
import type * as MetricPair from "@effect/io/MetricPair"
import type * as MetricRegistry from "@effect/io/MetricRegistry"
/** @internal */
const MetricRegistrySymbolKey = "@effect/io/Metric/Registry"
const MetricRegistrySymbolKey = "@effect/io/MetricRegistry"

@@ -18,0 +18,0 @@ /** @internal */

@@ -8,6 +8,6 @@ import type * as Chunk from "@effect/data/Chunk"

import { pipeArguments } from "@effect/data/Pipeable"
import type * as MetricState from "@effect/io/Metric/State"
import type * as MetricState from "@effect/io/MetricState"
/** @internal */
const MetricStateSymbolKey = "@effect/io/Metric/State"
const MetricStateSymbolKey = "@effect/io/MetricState"

@@ -20,3 +20,3 @@ /** @internal */

/** @internal */
const CounterStateSymbolKey = "effect/io/Metric/State/Counter"
const CounterStateSymbolKey = "effect/io/MetricStateCounter"

@@ -29,3 +29,3 @@ /** @internal */

/** @internal */
const FrequencyStateSymbolKey = "effect/io/Metric/State/Frequency"
const FrequencyStateSymbolKey = "effect/io/MetricStateFrequency"

@@ -38,3 +38,3 @@ /** @internal */

/** @internal */
const GaugeStateSymbolKey = "effect/io/Metric/State/Gauge"
const GaugeStateSymbolKey = "effect/io/MetricStateGauge"

@@ -47,3 +47,3 @@ /** @internal */

/** @internal */
const HistogramStateSymbolKey = "effect/io/Metric/State/Histogram"
const HistogramStateSymbolKey = "effect/io/MetricStateHistogram"

@@ -56,3 +56,3 @@ /** @internal */

/** @internal */
const SummaryStateSymbolKey = "effect/io/Metric/State/Summary"
const SummaryStateSymbolKey = "effect/io/MetricStateSummary"

@@ -59,0 +59,0 @@ /** @internal */

@@ -20,2 +20,8 @@ /** @internal */

/** @internal */
export type OP_FAILURE_WITH_ANNOTATION = typeof OP_FAILURE_WITH_ANNOTATION
/** @internal */
export const OP_FAILURE_WITH_ANNOTATION = "FailureWithAnnotation" as const
/** @internal */
export type OP_ON_FAILURE = typeof OP_ON_FAILURE

@@ -22,0 +28,0 @@

import { seconds } from "@effect/data/Duration"
import { dual } from "@effect/data/Function"
import { globalValue } from "@effect/data/Global"
import { globalValue } from "@effect/data/GlobalValue"
import type * as Cache from "@effect/io/Cache"

@@ -5,0 +5,0 @@ import type { Deferred } from "@effect/io/Deferred"

@@ -5,3 +5,3 @@ import * as Chunk from "@effect/data/Chunk"

import * as MutableRef from "@effect/data/MutableRef"
import type * as Option from "@effect/data/Option"
import * as Option from "@effect/data/Option"
import { pipeArguments } from "@effect/data/Pipeable"

@@ -16,3 +16,3 @@ import * as ReadonlyArray from "@effect/data/ReadonlyArray"

/** @internal */
const EnqueueSymbolKey = "@effect/io/Queue/Enqueue"
const EnqueueSymbolKey = "@effect/io/QueueEnqueue"

@@ -23,3 +23,3 @@ /** @internal */

/** @internal */
const DequeueSymbolKey = "@effect/io/Queue/Dequeue"
const DequeueSymbolKey = "@effect/io/QueueDequeue"

@@ -30,3 +30,3 @@ /** @internal */

/** @internal */
const QueueStrategySymbolKey = "@effect/io/Queue/Strategy"
const QueueStrategySymbolKey = "@effect/io/QueueStrategy"

@@ -60,3 +60,3 @@ /** @internal */

/** @internal */
readonly queue: MutableQueue.MutableQueue<A>,
readonly queue: Queue.BackingQueue<A>,
/** @internal */

@@ -78,14 +78,17 @@ readonly takers: MutableQueue.MutableQueue<Deferred.Deferred<never, A>>,

capacity(): number {
return MutableQueue.capacity(this.queue)
return this.queue.capacity()
}
size(): Effect.Effect<never, never, number> {
return core.suspend(() =>
MutableRef.get(this.shutdownFlag)
? core.interrupt
: core.succeed(
MutableQueue.length(this.queue) -
MutableQueue.length(this.takers) +
this.strategy.surplusSize()
)
return core.suspend(() => core.catchAll(this.unsafeSize(), () => core.interrupt))
}
unsafeSize() {
if (MutableRef.get(this.shutdownFlag)) {
return Option.none<number>()
}
return Option.some(
this.queue.length() -
MutableQueue.length(this.takers) +
this.strategy.surplusSize()
)

@@ -137,3 +140,3 @@ }

let noRemaining: boolean
if (MutableQueue.isEmpty(this.queue)) {
if (this.queue.length() === 0) {
const taker = pipe(

@@ -156,3 +159,3 @@ this.takers,

// Not enough takers, offer to the queue
const succeeded = pipe(this.queue, MutableQueue.offer(value))
const succeeded = this.queue.offer(value)
unsafeCompleteTakers(this.strategy, this.queue, this.takers)

@@ -168,3 +171,3 @@ return succeeded

let noRemaining: boolean
if (MutableQueue.isEmpty(this.queue)) {
if (this.queue.length() === 0) {
const taker = pipe(

@@ -187,3 +190,3 @@ this.takers,

// Not enough takers, offer to the queue
const succeeded = pipe(this.queue, MutableQueue.offer(value))
const succeeded = this.queue.offer(value)
unsafeCompleteTakers(this.strategy, this.queue, this.takers)

@@ -202,3 +205,3 @@ return succeeded

const values = ReadonlyArray.fromIterable(iterable)
const pTakers = MutableQueue.isEmpty(this.queue)
const pTakers = this.queue.length() === 0
? ReadonlyArray.fromIterable(unsafePollN(this.takers, values.length))

@@ -216,3 +219,3 @@ : ReadonlyArray.empty

// Not enough takers, offer to the queue
const surplus = unsafeOfferAll(this.queue, remaining)
const surplus = this.queue.offerAll(remaining)
unsafeCompleteTakers(this.strategy, this.queue, this.takers)

@@ -230,3 +233,3 @@ return Chunk.isEmpty(surplus)

}
const item = pipe(this.queue, MutableQueue.poll(MutableQueue.EmptyMutableQueue))
const item = this.queue.poll(MutableQueue.EmptyMutableQueue)
if (item !== MutableQueue.EmptyMutableQueue) {

@@ -262,3 +265,3 @@ this.strategy.unsafeOnQueueEmptySpace(this.queue, this.takers)

: core.sync(() => {
const values = unsafePollAll(this.queue)
const values = this.queue.pollUpTo(Number.POSITIVE_INFINITY)
this.strategy.unsafeOnQueueEmptySpace(this.queue, this.takers)

@@ -275,3 +278,3 @@ return Chunk.fromIterable(values)

: core.sync(() => {
const values = unsafePollN(this.queue, max)
const values = this.queue.pollUpTo(max)
this.strategy.unsafeOnQueueEmptySpace(this.queue, this.takers)

@@ -348,3 +351,3 @@ return Chunk.fromIterable(values)

core.sync(() => MutableQueue.bounded<A>(requestedCapacity)),
core.flatMap((queue) => make(queue, backPressureStrategy()))
core.flatMap((queue) => make(backingQueueFromMutableQueue(queue), backPressureStrategy()))
)

@@ -356,3 +359,3 @@

core.sync(() => MutableQueue.bounded<A>(requestedCapacity)),
core.flatMap((queue) => make(queue, droppingStrategy()))
core.flatMap((queue) => make(backingQueueFromMutableQueue(queue), droppingStrategy()))
)

@@ -364,3 +367,3 @@

core.sync(() => MutableQueue.bounded<A>(requestedCapacity)),
core.flatMap((queue) => make(queue, slidingStrategy()))
core.flatMap((queue) => make(backingQueueFromMutableQueue(queue), slidingStrategy()))
)

@@ -372,3 +375,3 @@

core.sync(() => MutableQueue.unbounded<A>()),
core.flatMap((queue) => make(queue, droppingStrategy()))
core.flatMap((queue) => make(backingQueueFromMutableQueue(queue), droppingStrategy()))
)

@@ -378,3 +381,3 @@

const unsafeMake = <A>(
queue: MutableQueue.MutableQueue<A>,
queue: Queue.BackingQueue<A>,
takers: MutableQueue.MutableQueue<Deferred.Deferred<never, A>>,

@@ -389,4 +392,4 @@ shutdownHook: Deferred.Deferred<never, void>,

/** @internal */
const make = <A>(
queue: MutableQueue.MutableQueue<A>,
export const make = <A>(
queue: Queue.BackingQueue<A>,
strategy: Queue.Strategy<A>

@@ -408,2 +411,29 @@ ): Effect.Effect<never, never, Queue.Queue<A>> =>

/** @internal */
export class BackingQueueFromMutableQueue<A> implements Queue.BackingQueue<A> {
constructor(readonly mutable: MutableQueue.MutableQueue<A>) {}
poll<Def>(def: Def): A | Def {
return MutableQueue.poll(this.mutable, def)
}
pollUpTo(limit: number): Chunk.Chunk<A> {
return MutableQueue.pollUpTo(this.mutable, limit)
}
offerAll(elements: Iterable<A>): Chunk.Chunk<A> {
return MutableQueue.offerAll(this.mutable, elements)
}
offer(element: A): boolean {
return MutableQueue.offer(this.mutable, element)
}
capacity(): number {
return MutableQueue.capacity(this.mutable)
}
length(): number {
return MutableQueue.length(this.mutable)
}
}
/** @internal */
export const backingQueueFromMutableQueue = <A>(mutable: MutableQueue.MutableQueue<A>): Queue.BackingQueue<A> =>
new BackingQueueFromMutableQueue(mutable)
/** @internal */
export const capacity = <A>(self: Queue.Dequeue<A> | Queue.Enqueue<A>): number => self.capacity()

@@ -530,3 +560,3 @@

iterable: Iterable<A>,
queue: MutableQueue.MutableQueue<A>,
queue: Queue.BackingQueue<A>,
takers: MutableQueue.MutableQueue<Deferred.Deferred<never, A>>,

@@ -550,7 +580,7 @@ isShutdown: MutableRef.MutableRef<boolean>

unsafeOnQueueEmptySpace(
queue: MutableQueue.MutableQueue<A>,
queue: Queue.BackingQueue<A>,
takers: MutableQueue.MutableQueue<Deferred.Deferred<never, A>>
): void {
let keepPolling = true
while (keepPolling && !MutableQueue.isFull(queue)) {
while (keepPolling && (queue.capacity() === Number.POSITIVE_INFINITY || queue.length() < queue.capacity())) {
const putter = pipe(this.putters, MutableQueue.poll(MutableQueue.EmptyMutableQueue))

@@ -560,3 +590,3 @@ if (putter === MutableQueue.EmptyMutableQueue) {

} else {
const offered = pipe(queue, MutableQueue.offer(putter[0]))
const offered = queue.offer(putter[0])
if (offered && putter[2]) {

@@ -611,3 +641,3 @@ unsafeCompleteDeferred(putter[1], true)

_iterable: Iterable<A>,
_queue: MutableQueue.MutableQueue<A>,
_queue: Queue.BackingQueue<A>,
_takers: MutableQueue.MutableQueue<Deferred.Deferred<never, A>>,

@@ -620,3 +650,3 @@ _isShutdown: MutableRef.MutableRef<boolean>

unsafeOnQueueEmptySpace(
_queue: MutableQueue.MutableQueue<A>,
_queue: Queue.BackingQueue<A>,
_takers: MutableQueue.MutableQueue<Deferred.Deferred<never, A>>

@@ -642,3 +672,3 @@ ): void {

iterable: Iterable<A>,
queue: MutableQueue.MutableQueue<A>,
queue: Queue.BackingQueue<A>,
takers: MutableQueue.MutableQueue<Deferred.Deferred<never, A>>,

@@ -655,3 +685,3 @@ _isShutdown: MutableRef.MutableRef<boolean>

unsafeOnQueueEmptySpace(
_queue: MutableQueue.MutableQueue<A>,
_queue: Queue.BackingQueue<A>,
_takers: MutableQueue.MutableQueue<Deferred.Deferred<never, A>>

@@ -662,3 +692,3 @@ ): void {

unsafeOffer(queue: MutableQueue.MutableQueue<A>, iterable: Iterable<A>): void {
unsafeOffer(queue: Queue.BackingQueue<A>, iterable: Iterable<A>): void {
const iterator = iterable[Symbol.iterator]()

@@ -668,8 +698,8 @@ let next: IteratorResult<A>

while (!(next = iterator.next()).done && offering) {
if (MutableQueue.capacity(queue) === 0) {
if (queue.capacity() === 0) {
return
}
// Poll 1 and retry
pipe(queue, MutableQueue.poll(MutableQueue.EmptyMutableQueue))
offering = pipe(queue, MutableQueue.offer(next.value))
queue.poll(MutableQueue.EmptyMutableQueue)
offering = queue.offer(next.value)
}

@@ -710,3 +740,3 @@ }

strategy: Queue.Strategy<A>,
queue: MutableQueue.MutableQueue<A>,
queue: Queue.BackingQueue<A>,
takers: MutableQueue.MutableQueue<Deferred.Deferred<never, A>>

@@ -716,6 +746,6 @@ ): void => {

let keepPolling = true
while (keepPolling && !MutableQueue.isEmpty(queue)) {
while (keepPolling && queue.length() !== 0) {
const taker = pipe(takers, MutableQueue.poll(MutableQueue.EmptyMutableQueue))
if (taker !== MutableQueue.EmptyMutableQueue) {
const element = pipe(queue, MutableQueue.poll(MutableQueue.EmptyMutableQueue))
const element = queue.poll(MutableQueue.EmptyMutableQueue)
if (element !== MutableQueue.EmptyMutableQueue) {

@@ -722,0 +752,0 @@ unsafeCompleteDeferred(taker, element)

import * as Chunk from "@effect/data/Chunk"
import * as Context from "@effect/data/Context"
import * as DeterministicRandom from "@effect/data/DeterministicRandom"
import { pipe } from "@effect/data/Function"
import * as PCGRandom from "@effect/data/PCGRandom"
import type * as Effect from "@effect/io/Effect"

@@ -23,6 +23,6 @@ import * as core from "@effect/io/internal/core"

readonly PRNG: DeterministicRandom.PCGRandom
readonly PRNG: PCGRandom.PCGRandom
constructor(readonly seed: number) {
this.PRNG = new DeterministicRandom.PCGRandom(seed)
this.PRNG = new PCGRandom.PCGRandom(seed)
}

@@ -29,0 +29,0 @@

import * as Context from "@effect/data/Context"
import { pipe } from "@effect/data/Function"
import { globalValue } from "@effect/data/Global"
import { globalValue } from "@effect/data/GlobalValue"
import type * as Effect from "@effect/io/Effect"

@@ -5,0 +5,0 @@ import * as core from "@effect/io/internal/core"

@@ -5,2 +5,3 @@ import * as Context from "@effect/data/Context"

import { pipeArguments } from "@effect/data/Pipeable"
import * as Predicate from "@effect/data/Predicate"
import type * as Cause from "@effect/io/Cause"

@@ -10,4 +11,3 @@ import type * as Effect from "@effect/io/Effect"

import * as Fiber from "@effect/io/Fiber"
import * as FiberId from "@effect/io/Fiber/Id"
import type * as RuntimeFlags from "@effect/io/Fiber/Runtime/Flags"
import * as FiberId from "@effect/io/FiberId"
import type * as FiberRef from "@effect/io/FiberRef"

@@ -24,2 +24,3 @@ import * as FiberRefs from "@effect/io/FiberRefs"

import type * as Runtime from "@effect/io/Runtime"
import type * as RuntimeFlags from "@effect/io/RuntimeFlags"
import * as _scheduler from "@effect/io/Scheduler"

@@ -143,3 +144,3 @@

export const isAsyncFiberException = (u: unknown): u is Runtime.AsyncFiberException<unknown, unknown> =>
typeof u === "object" && u !== null && "_tag" in u && u._tag === "AsyncFiberException" && "fiber" in u
Predicate.isTagged(u, "AsyncFiberException") && "fiber" in u

@@ -146,0 +147,0 @@ /** @internal */

import * as Differ from "@effect/data/Differ"
import { dual } from "@effect/data/Function"
import type * as RuntimeFlags from "@effect/io/Fiber/Runtime/Flags"
import type * as RuntimeFlagsPatch from "@effect/io/Fiber/Runtime/Flags/Patch"
import * as runtimeFlagsPatch from "@effect/io/internal/runtimeFlagsPatch"
import type * as RuntimeFlags from "@effect/io/RuntimeFlags"
import type * as RuntimeFlagsPatch from "@effect/io/RuntimeFlagsPatch"

@@ -7,0 +7,0 @@ /** @internal */

import { dual } from "@effect/data/Function"
import type * as RuntimeFlags from "@effect/io/Fiber/Runtime/Flags"
import type * as RuntimeFlagsPatch from "@effect/io/Fiber/Runtime/Flags/Patch"
import type * as RuntimeFlags from "@effect/io/RuntimeFlags"
import type * as RuntimeFlagsPatch from "@effect/io/RuntimeFlagsPatch"

@@ -5,0 +5,0 @@ /** @internal */

import * as Chunk from "@effect/data/Chunk"
import type * as ScheduleDecision from "@effect/io/Schedule/Decision"
import type * as Interval from "@effect/io/Schedule/Interval"
import * as Intervals from "@effect/io/Schedule/Intervals"
import type * as ScheduleDecision from "@effect/io/ScheduleDecision"
import type * as Interval from "@effect/io/ScheduleInterval"
import * as Intervals from "@effect/io/ScheduleIntervals"

@@ -6,0 +6,0 @@ /** @internal */

import * as Duration from "@effect/data/Duration"
import { dual } from "@effect/data/Function"
import * as Option from "@effect/data/Option"
import type * as Interval from "@effect/io/Schedule/Interval"
import type * as Interval from "@effect/io/ScheduleInterval"
/** @internal */
const IntervalSymbolKey = "@effect/io/Schedule/Interval"
const IntervalSymbolKey = "@effect/io/ScheduleInterval"

@@ -9,0 +9,0 @@ /** @internal */

import * as Chunk from "@effect/data/Chunk"
import { dual, pipe } from "@effect/data/Function"
import * as Option from "@effect/data/Option"
import * as Interval from "@effect/io/Schedule/Interval"
import type * as Intervals from "@effect/io/Schedule/Intervals"
import * as Interval from "@effect/io/ScheduleInterval"
import type * as Intervals from "@effect/io/ScheduleIntervals"
/** @internal */
const IntervalsSymbolKey = "@effect/io/Schedule/Intervals"
const IntervalsSymbolKey = "@effect/io/ScheduleIntervals"

@@ -10,0 +10,0 @@ /** @internal */

@@ -71,6 +71,2 @@ import type * as Context from "@effect/data/Context"

}
onRun<E, A, X>(execution: () => X, fiber: Fiber.RuntimeFiber<E, A>): X {
return this.underlying.onRun(execution, fiber)
}
}

@@ -129,6 +125,2 @@

}
onRun<E, A, X>(execution: () => X, fiber: Fiber.RuntimeFiber<E, A>): X {
return this.right.onRun(() => this.left.onRun(execution, fiber), fiber)
}
}

@@ -135,0 +127,0 @@

@@ -6,8 +6,8 @@ import { dual, pipe } from "@effect/data/Function"

import * as _ref from "@effect/io/internal/ref"
import type * as Synchronized from "@effect/io/Ref/Synchronized"
import type * as Synchronized from "@effect/io/SynchronizedRef"
/** @internal */
export const getAndUpdateEffect = dual<
<A, R, E>(f: (a: A) => Effect.Effect<R, E, A>) => (self: Synchronized.Synchronized<A>) => Effect.Effect<R, E, A>,
<A, R, E>(self: Synchronized.Synchronized<A>, f: (a: A) => Effect.Effect<R, E, A>) => Effect.Effect<R, E, A>
<A, R, E>(f: (a: A) => Effect.Effect<R, E, A>) => (self: Synchronized.SynchronizedRef<A>) => Effect.Effect<R, E, A>,
<A, R, E>(self: Synchronized.SynchronizedRef<A>, f: (a: A) => Effect.Effect<R, E, A>) => Effect.Effect<R, E, A>
>(2, (self, f) =>

@@ -22,5 +22,5 @@ self.modifyEffect(

pf: (a: A) => Option.Option<Effect.Effect<R, E, A>>
) => (self: Synchronized.Synchronized<A>) => Effect.Effect<R, E, A>,
) => (self: Synchronized.SynchronizedRef<A>) => Effect.Effect<R, E, A>,
<A, R, E>(
self: Synchronized.Synchronized<A>,
self: Synchronized.SynchronizedRef<A>,
pf: (a: A) => Option.Option<Effect.Effect<R, E, A>>

@@ -43,4 +43,4 @@ ) => Effect.Effect<R, E, A>

export const modify = dual<
<A, B>(f: (a: A) => readonly [B, A]) => (self: Synchronized.Synchronized<A>) => Effect.Effect<never, never, B>,
<A, B>(self: Synchronized.Synchronized<A>, f: (a: A) => readonly [B, A]) => Effect.Effect<never, never, B>
<A, B>(f: (a: A) => readonly [B, A]) => (self: Synchronized.SynchronizedRef<A>) => Effect.Effect<never, never, B>,
<A, B>(self: Synchronized.SynchronizedRef<A>, f: (a: A) => readonly [B, A]) => Effect.Effect<never, never, B>
>(2, (self, f) => self.modify(f))

@@ -52,5 +52,5 @@

f: (a: A) => Effect.Effect<R, E, readonly [B, A]>
) => (self: Synchronized.Synchronized<A>) => Effect.Effect<R, E, B>,
) => (self: Synchronized.SynchronizedRef<A>) => Effect.Effect<R, E, B>,
<A, R, E, B>(
self: Synchronized.Synchronized<A>,
self: Synchronized.SynchronizedRef<A>,
f: (a: A) => Effect.Effect<R, E, readonly [B, A]>

@@ -65,5 +65,5 @@ ) => Effect.Effect<R, E, B>

pf: (a: A) => Option.Option<Effect.Effect<R, E, readonly [B, A]>>
) => (self: Synchronized.Synchronized<A>) => Effect.Effect<R, E, B>,
) => (self: Synchronized.SynchronizedRef<A>) => Effect.Effect<R, E, B>,
<A, B, R, E>(
self: Synchronized.Synchronized<A>,
self: Synchronized.SynchronizedRef<A>,
fallback: B,

@@ -79,4 +79,6 @@ pf: (a: A) => Option.Option<Effect.Effect<R, E, readonly [B, A]>>

export const updateEffect = dual<
<A, R, E>(f: (a: A) => Effect.Effect<R, E, A>) => (self: Synchronized.Synchronized<A>) => Effect.Effect<R, E, void>,
<A, R, E>(self: Synchronized.Synchronized<A>, f: (a: A) => Effect.Effect<R, E, A>) => Effect.Effect<R, E, void>
<A, R, E>(
f: (a: A) => Effect.Effect<R, E, A>
) => (self: Synchronized.SynchronizedRef<A>) => Effect.Effect<R, E, void>,
<A, R, E>(self: Synchronized.SynchronizedRef<A>, f: (a: A) => Effect.Effect<R, E, A>) => Effect.Effect<R, E, void>
>(2, (self, f) =>

@@ -92,4 +94,4 @@ self.modifyEffect((value) =>

export const updateAndGetEffect = dual<
<A, R, E>(f: (a: A) => Effect.Effect<R, E, A>) => (self: Synchronized.Synchronized<A>) => Effect.Effect<R, E, A>,
<A, R, E>(self: Synchronized.Synchronized<A>, f: (a: A) => Effect.Effect<R, E, A>) => Effect.Effect<R, E, A>
<A, R, E>(f: (a: A) => Effect.Effect<R, E, A>) => (self: Synchronized.SynchronizedRef<A>) => Effect.Effect<R, E, A>,
<A, R, E>(self: Synchronized.SynchronizedRef<A>, f: (a: A) => Effect.Effect<R, E, A>) => Effect.Effect<R, E, A>
>(2, (self, f) =>

@@ -104,5 +106,5 @@ self.modifyEffect(

pf: (a: A) => Option.Option<Effect.Effect<R, E, A>>
) => (self: Synchronized.Synchronized<A>) => Effect.Effect<R, E, void>,
) => (self: Synchronized.SynchronizedRef<A>) => Effect.Effect<R, E, void>,
<A, R, E>(
self: Synchronized.Synchronized<A>,
self: Synchronized.SynchronizedRef<A>,
pf: (a: A) => Option.Option<Effect.Effect<R, E, A>>

@@ -109,0 +111,0 @@ ) => Effect.Effect<R, E, void>

@@ -15,4 +15,4 @@ import * as Chunk from "@effect/data/Chunk"

import type * as Fiber from "@effect/io/Fiber"
import type * as FiberId from "@effect/io/Fiber/Id"
import * as FiberStatus from "@effect/io/Fiber/Status"
import type * as FiberId from "@effect/io/FiberId"
import * as FiberStatus from "@effect/io/FiberStatus"
import * as clock from "@effect/io/internal/clock"

@@ -34,3 +34,3 @@ import * as core from "@effect/io/internal/core"

import type * as Ref from "@effect/io/Ref"
import type * as Synchronized from "@effect/io/Ref/Synchronized"
import type * as Synchronized from "@effect/io/SynchronizedRef"

@@ -118,4 +118,4 @@ /**

readonly annotations: Annotations.Annotations,
readonly warningState: Synchronized.Synchronized<WarningData.WarningData>,
readonly suspendedWarningState: Synchronized.Synchronized<SuspendedWarningData.SuspendedWarningData>
readonly warningState: Synchronized.SynchronizedRef<WarningData.WarningData>,
readonly suspendedWarningState: Synchronized.SynchronizedRef<SuspendedWarningData.SuspendedWarningData>
) {}

@@ -122,0 +122,0 @@

import type * as Duration from "@effect/data/Duration"
import type * as Deferred from "@effect/io/Deferred"
import type * as FiberId from "@effect/io/Fiber/Id"
import type * as FiberId from "@effect/io/FiberId"

@@ -5,0 +5,0 @@ /**

@@ -5,8 +5,6 @@ /**

import * as Context from "@effect/data/Context"
import { globalValue } from "@effect/data/Global"
import { globalValue } from "@effect/data/GlobalValue"
import * as MutableRef from "@effect/data/MutableRef"
import type * as Option from "@effect/data/Option"
import type * as Exit from "@effect/io/Exit"
import * as _fiberId from "@effect/io/internal/fiberId"
import * as _logger from "@effect/io/internal/logger"
import type * as Tracer from "@effect/io/Tracer"

@@ -75,3 +73,4 @@

export const nativeTracer: Tracer.Tracer = make({
span: (name, parent, context, links, startTime) => new NativeSpan(name, parent, context, links, startTime)
span: (name, parent, context, links, startTime) => new NativeSpan(name, parent, context, links, startTime),
context: (f) => f()
})

@@ -11,3 +11,3 @@ /**

import type { Effect } from "@effect/io/Effect"
import type * as FiberId from "@effect/io/Fiber/Id"
import type * as FiberId from "@effect/io/FiberId"
import type * as FiberRefs from "@effect/io/FiberRefs"

@@ -19,4 +19,4 @@ import * as fiberRuntime from "@effect/io/internal/fiberRuntime"

import type * as Layer from "@effect/io/Layer"
import type * as LogLevel from "@effect/io/Logger/Level"
import type * as LogSpan from "@effect/io/Logger/Span"
import type * as LogLevel from "@effect/io/LogLevel"
import type * as LogSpan from "@effect/io/LogSpan"
import type { Scope } from "@effect/io/Scope"

@@ -23,0 +23,0 @@

@@ -12,9 +12,9 @@ /**

import * as internal from "@effect/io/internal/metric"
import type * as MetricBoundaries from "@effect/io/Metric/Boundaries"
import type * as MetricKey from "@effect/io/Metric/Key"
import type * as MetricKeyType from "@effect/io/Metric/KeyType"
import type * as MetricLabel from "@effect/io/Metric/Label"
import type * as MetricPair from "@effect/io/Metric/Pair"
import type * as MetricRegistry from "@effect/io/Metric/Registry"
import type * as MetricState from "@effect/io/Metric/State"
import type * as MetricBoundaries from "@effect/io/MetricBoundaries"
import type * as MetricKey from "@effect/io/MetricKey"
import type * as MetricKeyType from "@effect/io/MetricKeyType"
import type * as MetricLabel from "@effect/io/MetricLabel"
import type * as MetricPair from "@effect/io/MetricPair"
import type * as MetricRegistry from "@effect/io/MetricRegistry"
import type * as MetricState from "@effect/io/MetricState"

@@ -21,0 +21,0 @@ /**

@@ -55,3 +55,3 @@ /**

/** @internal */
readonly queue: MutableQueue.MutableQueue<A>
readonly queue: BackingQueue<A>
/** @internal */

@@ -155,2 +155,9 @@ readonly takers: MutableQueue.MutableQueue<Deferred.Deferred<never, A>>

/**
* Retrieves the size of the queue, which is equal to the number of elements
* in the queue. This may be negative if fibers are suspended waiting for
* elements to be added to the queue. Returns None if shutdown has been called
*/
unsafeSize(): Option.Option<number>
/**
* Returns `true` if the `Queue` contains at least one element, `false`

@@ -209,3 +216,3 @@ * otherwise.

iterable: Iterable<A>,
queue: MutableQueue.MutableQueue<A>,
queue: BackingQueue<A>,
takers: MutableQueue.MutableQueue<Deferred.Deferred<never, A>>,

@@ -220,3 +227,3 @@ isShutdown: MutableRef.MutableRef<boolean>

unsafeOnQueueEmptySpace(
queue: MutableQueue.MutableQueue<A>,
queue: BackingQueue<A>,
takers: MutableQueue.MutableQueue<Deferred.Deferred<never, A>>

@@ -228,3 +235,42 @@ ): void

* @since 1.0.0
* @category models
*/
export interface BackingQueue<A> {
/**
* Dequeues an element from the queue.
* Returns either an element from the queue, or the `def` param.
*/
poll<Def>(def: Def): A | Def
/**
* Dequeues up to `limit` elements from the queue.
*/
pollUpTo(limit: number): Chunk.Chunk<A>
/**
* Enqueues a collection of values into the queue.
*
* Returns a `Chunk` of the values that were **not** able to be enqueued.
*/
offerAll(elements: Iterable<A>): Chunk.Chunk<A>
/**
* Offers an element to the queue.
*
* Returns whether the enqueue was successful or not.
*/
offer(element: A): boolean
/**
* The **maximum** number of elements that a queue can hold.
*
* **Note**: unbounded queues can still implement this interface with
* `capacity = Infinity`.
*/
capacity(): number
/**
* Returns the number of elements currently in the queue
*/
length(): number
}
/**
* @since 1.0.0
*/
export declare namespace Queue {

@@ -305,2 +351,9 @@ /**

/**
* @since 1.0.0
* @category constructors
*/
export const make: <A>(queue: BackingQueue<A>, strategy: Strategy<A>) => Effect.Effect<never, never, Queue<A>> =
internal.make
/**
* Makes a new bounded `Queue`. When the capacity of the queue is reached, any

@@ -307,0 +360,0 @@ * additional calls to `offer` will be suspended until there is more room in

@@ -33,3 +33,6 @@ /**

*/
export namespace Ref {
export declare namespace Ref {
/**
* @since 1.0.0
*/
export interface Variance<A> {

@@ -36,0 +39,0 @@ readonly [RefTypeId]: {

@@ -11,3 +11,3 @@ /**

import type * as Exit from "@effect/io/Exit"
import type { FiberId } from "@effect/io/Fiber/Id"
import type { FiberId } from "@effect/io/FiberId"
import * as _RequestBlock from "@effect/io/internal/blockedRequests"

@@ -14,0 +14,0 @@ import * as cache from "@effect/io/internal/cache"

@@ -10,6 +10,6 @@ /**

import type * as Fiber from "@effect/io/Fiber"
import type * as FiberId from "@effect/io/Fiber/Id"
import type * as RuntimeFlags from "@effect/io/Fiber/Runtime/Flags"
import type * as FiberId from "@effect/io/FiberId"
import type * as FiberRefs from "@effect/io/FiberRefs"
import * as internal from "@effect/io/internal/runtime"
import type * as RuntimeFlags from "@effect/io/RuntimeFlags"
import type { Scheduler } from "@effect/io/Scheduler"

@@ -16,0 +16,0 @@

@@ -15,4 +15,4 @@ /**

import * as internal from "@effect/io/internal/schedule"
import type * as ScheduleDecision from "@effect/io/Schedule/Decision"
import type * as Intervals from "@effect/io/Schedule/Intervals"
import type * as ScheduleDecision from "@effect/io/ScheduleDecision"
import type * as Intervals from "@effect/io/ScheduleIntervals"

@@ -102,2 +102,5 @@ /**

/**
* @since 1.0.0
*/
export interface DriverVariance<Env, In, Out> {

@@ -104,0 +107,0 @@ readonly [ScheduleDriverTypeId]: {

@@ -5,3 +5,3 @@ /**

import { globalValue } from "@effect/data/Global"
import { globalValue } from "@effect/data/GlobalValue"

@@ -8,0 +8,0 @@ /**

@@ -8,4 +8,4 @@ /**

import * as internal from "@effect/io/internal/scopedRef"
import type * as Synchronized from "@effect/io/Ref/Synchronized"
import type * as Scope from "@effect/io/Scope"
import type * as Synchronized from "@effect/io/SynchronizedRef"

@@ -36,3 +36,3 @@ /**

/** @internal */
readonly ref: Synchronized.Synchronized<readonly [Scope.Scope.Closeable, A]>
readonly ref: Synchronized.SynchronizedRef<readonly [Scope.Scope.Closeable, A]>
}

@@ -39,0 +39,0 @@

@@ -59,7 +59,2 @@ /**

/**
* Supervises the run of a `Fiber`.
*/
onRun<E, A, X>(execution: () => X, fiber: Fiber.RuntimeFiber<E, A>): X
/**
* Supervises the execution of an `Effect` by a `Fiber`.

@@ -66,0 +61,0 @@ */

@@ -9,2 +9,3 @@ /**

import * as defaultServices from "@effect/io/internal/defaultServices"
import type { FiberRuntime } from "@effect/io/internal/fiberRuntime"
import * as internal from "@effect/io/internal/tracer"

@@ -34,2 +35,3 @@

) => Span
readonly context: <X>(f: () => X, fiber: FiberRuntime<any, any>) => X
}

@@ -36,0 +38,0 @@

@@ -45,6 +45,2 @@ /**

/**
* Supervises the run of a `Fiber`.
*/
onRun<E, A, X>(execution: () => X, fiber: Fiber.RuntimeFiber<E, A>): X;
/**
* Supervises the execution of an `Effect` by a `Fiber`.

@@ -51,0 +47,0 @@ */

@@ -8,2 +8,3 @@ /**

import type * as Exit from "@effect/io/Exit";
import type { FiberRuntime } from "@effect/io/internal/fiberRuntime";
/**

@@ -23,2 +24,3 @@ * @since 1.0.0

readonly span: (name: string, parent: Option.Option<ParentSpan>, context: Context.Context<never>, links: ReadonlyArray<SpanLink>, startTime: bigint) => Span;
readonly context: <X>(f: () => X, fiber: FiberRuntime<any, any>) => X;
}

@@ -25,0 +27,0 @@ /**

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc