node/test/message/max_tick_depth.js

10 lines
182 B
JavaScript

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);
});