mirror of https://github.com/nodejs/node.git
doc: fix confusing example in process.md
PR-URL: https://github.com/nodejs/node/pull/12282 Fixes: https://github.com/nodejs/node/issues/12280 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>pull/12307/head
parent
fe016c6cd9
commit
b2a12ee782
|
@ -1256,9 +1256,12 @@ function maybeSync(arg, cb) {
|
|||
This API is hazardous because in the following case:
|
||||
|
||||
```js
|
||||
maybeSync(true, () => {
|
||||
const maybeTrue = Math.random() > 0.5;
|
||||
|
||||
maybeSync(maybeTrue, () => {
|
||||
foo();
|
||||
});
|
||||
|
||||
bar();
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue