Skip to content
Discussion options

You must be logged in to vote

I see, but once it reaches the controller method, I should be "safe"?

Yes, the code you posted, inside the action method, it's safe to use. It's just a block of code running and as long as you don't switch threads within the action method the code you posted is totally fine and "safe". Only after the action method exits Play takes over again and could internally switch threads. But when you exit the method you also already exited the scope as well. btw, you also need to take care to not switch threads in your DomainLogicStuff and then try to access the ScopedValue from such a different thread as well of course (but I guess you know that ;)

However, instead of writing that code in very a…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@mkurz
Comment options

@mihe-inf
Comment options

@mkurz
Comment options

Answer selected by mihe-inf
@mihe-inf
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants