Skip to content

Commit 758bf4d

Browse files
fix: format
1 parent dc189d6 commit 758bf4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/site/pages/en/learn/asynchronous-work/discover-promises-in-nodejs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ console.log('Synchronous task executed');
381381

382382
- Use `queueMicrotask()` for tasks that need to run immediately after the current script and before any I/O or timer callbacks, typically for Promise resolutions.
383383
- Use `process.nextTick()` for tasks that should execute before any I/O events, often useful for deferring operations or handling errors synchronously.
384-
– Use `setImmediate()` for tasks that should run after the current event loop's I/O events.
384+
– Use `setImmediate()` for tasks that should run after the current event loop's I/O events.
385385

386386
Because these tasks execute outside of the current synchronous flow, uncaught exceptions inside these callbacks won't be caught by surrounding `try/catch` blocks and may crash the application if not properly managed (e.g., by attaching `.catch()` to Promises or using global error handlers like `process.on('uncaughtException')`).
387387

0 commit comments

Comments
 (0)