The execution order of nextTick and setImmediate in node

process.nextTick(() => {
  console.log("nextTick");
});

setImmediate(() => {
  console.log("setImmediate1");
  process.nextTick(() => {
    console.log("");
  });
});

setImmediate(() => {
  console.log("setImmediate2");
});

the result of the execution of this code in the higher version of node is:

nextTick
setImmediate1
setImmediate2

node says in this book that the callback functions of process.nextTick () are saved in an array, and each round of Tick will execute all the callback functions in the array; setImmediate () results are saved in the linked list, and each round of Tick only executes one callback function, which is not consistent with the above implementation results?

Mar.30,2021
In the
check phase, two setImmediate callbacks are found to be executed, and another nextTick is generated during the first setImmediate callback, but I don't care. I haven't passed the check phase, so finish my callback first, and wait for the check phase to complete the execution of nextTick at the end.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e8d6-2c41c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e8d6-2c41c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?