-
-
Notifications
You must be signed in to change notification settings - Fork 35.1k
Description
Taking apart #1665.
While #1674 looks like a good thing, almost eveyone seems to think that it replaces #1665. But it doesn't touch the initial point of #1665 — to discourage using *Sync versions of the methods that could be async.
The reasoning is mostly the same as in #1665.
Two alternatives here:
-
Create a separate page with a warning against improper usage of blocking methods and add a small but instantly visible reference from every
*Syncmethod documentation to that page.
Sample:fs.accessSync(path[, mode])
Warning: this is blocking call, do not use in an asynchronous enviroment unless you know what you are doing. More info on some nice title (link).
Synchronous version of fs.access. This throws if any accessibility checks fail, and does nothing otherwise.
-
Create a separate page with a warning and move all
*Syncmethods documentation to that page, leaving only references (possibly with headers) to it on the corresponding module pages.
Sample:fs.accessSync(path[, mode])
A blocking call, the documentation is listed on some nice title (link).
Notice: I am not a native English speaker and can be a bit wrong with woridings.