Skip to content

Problem with PF v2.9.x/v3.x + async caffeine cache + CompletableFuture.join() #12353

Answered by mkurz
Rotkaf asked this question in Q&A
Discussion options

You must be logged in to vote

So yeah this worked with Play 2.8 but now your code deadlocks in Play 2.9 and 3.0...
The code change "causing" this is 6b17ee9#diff-039dc927703c7a9f8f525d7b6cef5b27ae98e93d5fb9489ec84464b731be00c2R222, where I switched the executioncontext of some very lightwight operation to be a Play internal trampline executor. Using trampoline just means that the execution of a task should not happen on another thread (of maybe another thread pool) but the exact same thread that is already executing. The intention is to avoid thread switching for very lightwight things like casting, etc. (like the code referenced), to avoid unnecessary slowdowns. The thing is we do use trampoline not just in the cache…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Rotkaf
Comment options

You must be logged in to vote
0 replies
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