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.
I need Google Play data(for example, reviews) in multiple localizations. I want to parse reviews in multiple threads, so in each thread I
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.