11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst common = require('../common'); 31cb0ef41Sopenharmony_ciconst { AsyncLocalStorage } = require('async_hooks'); 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ci// Regression test for: https://github.com/nodejs/node/issues/34556 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ciconst als = new AsyncLocalStorage(); 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ciconst done = common.mustCall(); 101cb0ef41Sopenharmony_ci 111cb0ef41Sopenharmony_cifunction run(count) { 121cb0ef41Sopenharmony_ci if (count !== 0) return als.run({}, run, --count); 131cb0ef41Sopenharmony_ci done(); 141cb0ef41Sopenharmony_ci} 151cb0ef41Sopenharmony_cirun(1000); 16