node/test/message/max_tick_depth.js

11 lines
196 B
JavaScript

'use strict';
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);
});