Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Volley.newRequestQueue() to be called on main thread #274

Merged
merged 6 commits into from
May 30, 2019

Conversation

Poligun
Copy link
Contributor

@Poligun Poligun commented May 30, 2019

Currently the helper method calls context.getCacheDir() synchronously and causes strict mode violation when invoked on main thread. By using a supplier instead we can have it constructed lazily on the dispatcher's thread.

…structed lazily (and preferably within the initialize() method which is invoked by CacheDispatcher on a non-UI thread). Currently Volley.newRequestQueue() is causing strict mode violation when called on main thread.
Copy link
Collaborator

@jpd236 jpd236 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally this concept looks reasonable to me. Just a small suggestion for simplification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants