···11-import { mo } from "../../src/index.ts";
22-import { AtomicInt32 } from "../../src/index.ts";
11+import { mo } from '../../src/index.ts';
22+import type { AtomicInt32 } from '../../src/index.ts';
3344export const increment = mo(import.meta, (counter: AtomicInt32): number => {
55 return counter.add(1);
+3-3
examples/atomics/main.ts
···11-// Shared memory between main thread and workers using AtomicInt32.
11+// Shared memory between main thread and workers using int32atomic.
22//
33// Run: node --experimental-strip-types examples/atomics/main.ts
4455-import { workerPool, AtomicInt32 } from '../../src/index.ts';
55+import { workerPool, int32atomic } from '../../src/index.ts';
66import { increment } from './increment.ts';
7788-const counter = new AtomicInt32();
88+const counter = int32atomic();
99const pool = workerPool(4);
10101111// Fire off 100 increments across 4 workers