I want to maintain an object at the thread level or the coroutine level depending on the type of work the application is doing across different thread/coroutines. Is there a way to achieve this?
let's say for simplicity's sake, I can write a Spring Boot Application where many things are happening based on threads and only certain parts of code use coroutines to leverage their benefits. How do I maintain state based on the current execution? is there a way to do this?