Skip to content

Commit e03fdfa

Browse files
Hussein NasserHussein Nasser
authored andcommitted
fixes
1 parent ed13556 commit e03fdfa

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

06-check/060-setImmediate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ console.log(`START`);
66
const readFileCallback = (err, data) => {
77
console.log(`readFileCallback ${data}`);
88
};
9-
const f = 'test1.txt'
9+
const f = 'test123.txt'
1010
//in the intial phase this file will only be opened (not read)
1111
//if it fails we immediately know, we add a callback in the poll queue with failure.
1212
fs.readFile(f, readFileCallback);

08-nextTick/081-multipleNextTicks.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ fs.readFile(__filename, () => {
2323
console.log("read file.")
2424
setImmediate(() => {
2525
console.log('immediate');
26+
process.nextTick( ()=>console.log("nextTick after check phase"))
27+
2628
});
2729
process.nextTick( ()=>console.log("nextTick after poll phase"))
2830

08-nextTick/083-nextTickInit.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ function test () {
66
//the output is undefined
77
//if we call it through nextTick
88
//the output is 1
9-
process.nextTick( test)
9+
//process.nextTick( test)
10+
//test()
11+
//setTimeout( test, 0)
1012
val = 1;

0 commit comments

Comments
 (0)