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

How to use library in multithreaded mode? #51

Open
jaturken opened this issue May 8, 2014 · 0 comments
Open

How to use library in multithreaded mode? #51

jaturken opened this issue May 8, 2014 · 0 comments

Comments

@jaturken
Copy link

jaturken commented May 8, 2014

I need Google Play data(for example, reviews) in multiple localizations. I want to parse reviews in multiple threads, so in each thread I

  • set localization
  • get reviews.

When runned in one thread, code works perfectly, but problems appears in multithreaded mode - reviews are requested from incorrect locale. I don't want to synchronize these two actions by mutex or smth else - it destroys the idea of using threads. There was an idea about cloning instance of GooglePlayAPI object for each thread, but it is unclonable.

How can I use library in multithreaded mode? Am I missing something? Maybe it's possible to set localization for each request?

My environment: jruby, sidekiq as threads manager. Yep, I use library from ruby.

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

No branches or pull requests

1 participant