stephanenicolas/robospice — pull request #296 by seva-ask (2014-04-20 02:24:02+00:00)
Title: request processor listeners loss fix

Hello!
It's me again with strange multithreaded bugs :)
I've noticed that sometimes my request listeners are not called and then have found these lines in log:

04-20 04:11:56.448 14869-14928/ru.car2car.droid D/RequestProcessor.java:85﹕ 04:11:56.454 SpiceManagerThread 0 Adding entry for type class ru.car2car.droid.requests.api.methods.user.UserProfileRequest$Response and cacheKey http#3A#2F#2Fcar2car.ru#2Fapi#2Fuser#2Fprofile#2F#3Fsession_id#3D535313aa563d22.57601009#0b4dc5b937dd4d3e02881fb3ff20331b.
04-20 04:11:56.448 14869-14927/ru.car2car.droid D/RequestProcessor.java:85﹕ 04:11:56.455 SpiceManagerThread 0 Adding entry for type class ru.car2car.droid.requests.api.methods.user.UserProfileRequest$Response and cacheKey http#3A#2F#2Fcar2car.ru#2Fapi#2Fuser#2Fprofile#2F#3Fsession_id#3D535313aa563d22.57601009#0b4dc5b937dd4d3e02881fb3ff20331b.

It was strange that same log message was repeated almost at same time.
In code I found that request processor has not synchronized adding requests.
I also have written a test that failes with old version and passes with new.

P.S. You asked me to tell when project using Robospice will be released to market. So it's there: https://play.google.com/store/apps/details?id=ru.stream.droid. I think later I can give links to some more our projects with Robospice.