11 lines
263 B
JavaScript
11 lines
263 B
JavaScript
|
import { parentPort } from "worker_threads";
|
||
|
import * as Comlink from "../../../dist/esm/comlink.mjs";
|
||
|
import nodeEndpoint from "../../../dist/esm/node-adapter.mjs";
|
||
|
|
||
|
const api = {
|
||
|
doMath() {
|
||
|
return 4;
|
||
|
},
|
||
|
};
|
||
|
Comlink.expose(api, nodeEndpoint(parentPort));
|