"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.scheduleForked = scheduleForked;
exports.scheduleForked_ = void 0;

var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/core/io/Effect/operations/schedule"));

var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/core/io/Effect/operations/forkScoped"));

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; }

const scheduleForked_ = scheduleForked_1;
/**
 * Runs this effect according to the specified schedule in a new fiber
 * attached to the current scope.
 *
 * @tsplus fluent ets/Effect scheduleForked
 */

exports.scheduleForked_ = scheduleForked_;

function scheduleForked_1(self, schedule, __tsplusTrace) {
  return tsplus_module_2.forkScoped(tsplus_module_1.schedule_(self, schedule, __tsplusTrace), __tsplusTrace);
}
/**
 * Runs this effect according to the specified schedule in a new fiber
 * attached to the current scope.
 *
 * @tsplus static ets/Effect/Aspects scheduleForked
 */


function scheduleForked(schedule, __tsplusTrace) {
  return self => scheduleForked_1(self, schedule, __tsplusTrace);
}
//# sourceMappingURL=scheduleForked.js.map