Move Hooks
Lint / lint (push) Failing after 11s

This commit is contained in:
Julien Valverdé
2025-10-01 01:14:45 +02:00
parent 8e0e6b40f6
commit 62a57b1b28
24 changed files with 2 additions and 11 deletions
+18
View File
@@ -0,0 +1,18 @@
import { Exit, Runtime, Scope } from "effect"
import type { ScopeOptions } from "./ScopeOptions.js"
export const closeScope = (
scope: Scope.CloseableScope,
runtime: Runtime.Runtime<never>,
options?: ScopeOptions,
) => {
switch (options?.finalizerExecutionMode ?? "sync") {
case "sync":
Runtime.runSync(runtime)(Scope.close(scope, Exit.void))
break
case "fork":
Runtime.runFork(runtime)(Scope.close(scope, Exit.void))
break
}
}