Something went wrong. Try again.
Offload functions to worker threads with shared memory primitives for Node.js.
Something went wrong. Try again.
12345678910import { mo } from '../../src/index.ts';
export const processImage = mo(import.meta, (pixels: Uint8Array): Uint8Array => { // Invert each pixel (simulate image processing) for (let i = 0; i < pixels.length; i++) { pixels[i] = 255 - pixels[i]; } return pixels;});