Retain AsyncLocal value after async method that set it returns
Let’s say I have an async method Task Parent()
that calls a synchronous method void Child()
. The Child()
method sets the value of some AsyncLocal. After Child()
returns the AsyncLocal value that was set by it is visible in the remainder of the Parent()
method and all other methods called by it.