| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 607b33c commit a4c28d7
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -783,6 +783,18 @@ Importing assert directly is not recommended as the exposed functions will use | |||
| 783 | 783 | loose equality checks. Use `require('assert').strict` instead. The API is the | |
| 784 | 784 | same as the legacy assert but it will always use strict equality checks. | |
| 785 | 785 | ||
| 786 | + <a id="DEP0098"></a> | ||
| 787 | + ### DEP0098: AsyncHooks Embedder AsyncResource.emit{Before,After} APIs | ||
| 788 | + | ||
| 789 | + Type: Runtime | ||
| 790 | + | ||
| 791 | + The embedded API provided by AsyncHooks exposes emit{Before,After} methods | ||
| 792 | + which are very easy to use incorrectly which can lead to unrecoverable errors. | ||
| 793 | + | ||
| 794 | + Use [`asyncResource.runInAsyncScope()`][] API instead which provides a much | ||
| 795 | + safer, and more convenient, alternative. See | ||
| 796 | + https://github.com/nodejs/node/pull/18513 for more details. | ||
| 797 | + | ||
| 786 | 798 | [`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size | |
| 787 | 799 | [`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array | |
| 788 | 800 | [`Buffer.from(buffer)`]: buffer.html#buffer_class_method_buffer_from_buffer | |
@@ -792,6 +804,7 @@ same as the legacy assert but it will always use strict equality checks. | |||
| 792 | 804 | [`Server.getConnections()`]: net.html#net_server_getconnections_callback | |
| 793 | 805 | [`Server.listen({fd: <number>})`]: net.html#net_server_listen_handle_backlog_callback | |
| 794 | 806 | [`SlowBuffer`]: buffer.html#buffer_class_slowbuffer | |
| 807 | + [`asyncResource.runInAsyncScope()`]: async_hooks.html#async_hooks_asyncresource_runinasyncscope_fn_thisarg_args | ||
| 795 | 808 | [`child_process`]: child_process.html | |
| 796 | 809 | [`console.error()`]: console.html#console_console_error_data_args | |
| 797 | 810 | [`console.log()`]: console.html#console_console_log_data_args | |
| Back | FazBrowse Home | New Git URL |
0 commit comments