Skip to content

Best way to ensure Context is cleared from a pooled thread #5482

Answered by jkwatson
Azquelt asked this question in Q&A
Discussion options

You must be logged in to vote

I think the best option is to force Context.root().makeCurrent() before handing out the thread to the user. Yes, there will be a warning when scopes are properly improperly closed, but this is exactly what you need to know. Not closing scopes can lead to very bad bugs, so knowing about it is quite important.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Azquelt
Comment options

@jkwatson
Comment options

Answer selected by Azquelt
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