mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
b872d30d19
Support configuration of the HeapSnapshotMode and NumericsMode fields inf HeapSnapshotOptions in the JS APIs for heap snapshots. PR-URL: https://github.com/nodejs/node/pull/44989 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
19 lines
266 B
JavaScript
19 lines
266 B
JavaScript
'use strict';
|
|
|
|
const {
|
|
parentPort,
|
|
isMainThread
|
|
} = require('node:worker_threads');
|
|
|
|
class Klass {
|
|
numeric = 1234;
|
|
nonNumeric = 'test';
|
|
}
|
|
|
|
globalThis.obj = new Klass();
|
|
|
|
if (!isMainThread) {
|
|
parentPort.postMessage('ready');
|
|
setInterval(() => {}, 100);
|
|
}
|