Great article. Learning a lot and trying to apply it to my project.
Since you’re storing
CONTEXT outside of the handler, can that be possibly mutated by concurrent invocations on the same container?
Say for example,
- Invocation A arrives (sets the global
- Invocation B arrives before Invocation A finishes (this resets the global
- Invocation B finishes and returns (uses the global
- Invocation A finishes and returns (uses the global
CONTEXTbut by this time, the state of
CONTEXTis for Invocation B).
Am I misunderstanding something?