Jeff-Lewis / cls-hooked

cls-hooked : CLS using AsynWrap or async_hooks instead of async-listener for node 4.7+
BSD 2-Clause "Simplified" License
759 stars 89 forks source link

Experimental issue of Async-hooks in Nodejs docs. #56

Open hadirsa opened 4 years ago

hadirsa commented 4 years ago

Hi, community. We are deciding to use a package that has this cls-hooked in its dependencies. We know that this package uses async_hooks which has marked as Experimental in Nodejs docs: https://nodejs.org/api/async_hooks.html#async_hooks_async_hooks

The question is: Is there any plan for the depreciation of async_hooks in the Node Js new versions? I mean that what we will do if async_hooks gets deprecated.

I appreciate any recommendations.

paambaati commented 4 years ago

@hadirsa The async_hooks API is finally out of experimental and is now part of the stable Node v14 APIs.

Rauttis commented 4 years ago

@hadirsa The async_hooks API is finally out of experimental and is now part of the stable Node v14 APIs.

Got a source for this? The node docs for v14 still claim it is experimental: https://nodejs.org/docs/latest-v14.x/api/async_hooks.html

Newer versions of 13 and 14 does add AsyncLocalStorage though, which actually has a very similar api to CLS. I believe it is just syntax sugar on top of async hooks though, so it is experimental as well.