Document ns.enter()/.exit() methods
puzpuzpuz opened this issue · comments
These methods should be included into the documentation (and thus, included into public API) as there are some use cases when ns.run()/.runAndReturn()/.bind()
are not an option.
Namely, ns.enter()/.exit()
methods are very helpful in case of generators. See here for an example: https://github.com/puzpuzpuz/cls-rtracer/blob/master/index.js#L76
Wow, @puzpuzpuz, that was the exact usecase (Koa V1 middleware) I was trying to implement.
Thanks!
@jrnail23 no problem at all. Glad that this information was helpful.