File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -15,5 +15,7 @@ function doTimeout() {
15
15
}
16
16
17
17
const asyncDebugger = new AsyncDebugger ( ) ;
18
- asyncDebugger . notifyComplete ( ( ) => console . log ( "All done!" ) ) ;
18
+ asyncDebugger . notifyComplete ( ( ) => console . log ( "********** All done! ********** " ) ) ;
19
19
asyncDebugger . startTracking ( "test-1" , doTimeout ) ;
20
+
21
+ console . log ( "End of script" ) ;
Original file line number Diff line number Diff line change
1
+ //
2
+ // Run me with --expose-gc
3
+ //
4
+ // node --expose-gc example.js
5
+ //
6
+
7
+ const { AsyncDebugger } = require ( "./lib/async-debugger" ) ;
8
+
9
+ console . log ( "Starting up!" ) ;
10
+
11
+ function doTimeout ( ) {
12
+ console . log ( "Starting timeout." ) ;
13
+
14
+ setTimeout ( ( ) => {
15
+ console . log ( "Timeout finished." ) ;
16
+ } , 2000 ) ;
17
+ }
18
+
19
+ const asyncDebugger = new AsyncDebugger ( ) ;
20
+ asyncDebugger . notifyComplete ( ( ) => console . log ( "********** All done! **********" ) ) ;
21
+ asyncDebugger . startTracking ( "test-1" , doTimeout ) ;
22
+
23
+ console . log ( "End of script" ) ;
You can’t perform that action at this time.
0 commit comments