0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/message/max_tick_depth.js

10 lines
182 B
JavaScript
Raw Normal View History

var common = require('../common');
process.maxTickDepth = 10;
var i = 20;
process.nextTick(function f() {
console.error('tick %d', i);
if (i-- > 0)
process.nextTick(f);
});