Logo
Explore Help
Sign In
1berry/nodejs
1
0
Fork 0
You've already forked nodejs
Code Issues Packages Projects Releases Wiki Activity
nodejs/test/parallel/test-process-getactiveresources.js

10 lines
170 B
JavaScript
Raw Permalink Normal View History

process: add `getActiveResourcesInfo()` This is supposed to be a public alternative of the private APIs, `process._getActiveResources()` and `process._getActiveHandles()`. When called, it returns an array of strings containing the types of the active resources that are currently keeping the event loop alive. Signed-off-by: Darshan Sen <darshan.sen@postman.com> PR-URL: https://github.com/nodejs/node/pull/40813 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-12-14 19:39:08 +05:30
'use strict';
require('../common');
const assert = require('assert');
setTimeout(() => {}, 0);
assert.deepStrictEqual(process.getActiveResourcesInfo(), ['Timeout']);
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 2991ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API