codeconsole commented on code in PR #16797:
URL: https://github.com/apache/grails-core/pull/16797#discussion_r4419633138
##########
grails-async/plugin/src/main/groovy/org/grails/plugins/web/async/GrailsWebRequestTaskDecorator.groovy:
##########
@@ -51,7 +55,9 @@ class GrailsWebRequestTaskDecorator implements TaskDecorator {
captured.currentRequest,
captured.currentResponse,
captured.attributes)
- WebUtils.storeGrailsWebRequest(taskRequest)
+ // Bound to the task's thread only: the request is still shared
with the request thread, which
+ // would find the task's web request on it from then on
+ RequestContextHolder.setRequestAttributes(taskRequest)
Review Comment:
Added in 386eec2ee9: the comment now gives both reasons, the request thread
finding the task's web request on the shared request, and a fire-and-forget
task writing it to a request the container may have recycled.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]