This commit is contained in:
2026-10-19 12:16:49 -04:00
parent d7ecab6494
commit 6d3f470922
10446 changed files with 1626249 additions and 2216 deletions
+14
View File
@@ -0,0 +1,14 @@
import { type IWASMInterface, WASMInterface } from "./WASMInterface";
import type Mutex from "./mutex";
import type { IEmbeddedWasm } from "./util";
export default async function lockedCreate(
mutex: Mutex,
binary: IEmbeddedWasm,
hashLength: number,
): Promise<IWASMInterface> {
const unlock = await mutex.lock();
const wasm = await WASMInterface(binary, hashLength);
unlock();
return wasm;
}