mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
PR-URL: https://github.com/nodejs/node/pull/60641 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
24 lines
459 B
JavaScript
24 lines
459 B
JavaScript
// Flags: --expose-gc
|
|
'use strict';
|
|
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const { channel } = require('diagnostics_channel');
|
|
|
|
function test() {
|
|
const testChannel = channel('test-gc');
|
|
|
|
setTimeout(common.mustCall(() => {
|
|
const testChannel2 = channel('test-gc');
|
|
|
|
assert.ok(testChannel === testChannel2, 'Channel instances must be the same');
|
|
}));
|
|
}
|
|
|
|
test();
|
|
|
|
setTimeout(() => {
|
|
global.gc();
|
|
test();
|
|
}, 10);
|