• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2
3const common = require('../common');
4const async_hooks = require('async_hooks');
5const fs = require('fs');
6
7let nestedCall = false;
8
9async_hooks.createHook({
10  init: common.mustCall(() => {
11    nestedHook.disable();
12    if (!nestedCall) {
13      nestedCall = true;
14      fs.access(__filename, common.mustCall());
15    }
16  }, 2)
17}).enable();
18
19const nestedHook = async_hooks.createHook({
20  init: common.mustCall(2)
21}).enable();
22
23fs.access(__filename, common.mustCall());
24