multithreading - Picasso Android image loading - threading model -
here did:
- created custom downloader (
extends okhttpdownloader) , assigned picasso. - inside downloader, added interceptor (
getclient().interceptors().add(new interceptor() {...})
i launched android app in debug mode, noticed there 2 threads, each appropriately named "picasso-....". when try access image web, each of these threads calls public response intercept(chain chain) method of interceptor, meaning same request processed more one thread simultaneously. what's reason behind this?
thanks gavriel getting me simple setting rudimentary picasso setup , homework, i.e. experiment bit. anyhow. discovered doing:
picasso.setindicatorsenabled(true); and/or picasso.setloggingenabled(true);
actually created thread (for guess managing kind of debug info?). confusing hell out of me - 2 threads execute request once each. confusing, whatever. guess it's done asynchronously, make sense logging anyway. idea, though, why second thread execute image request?
Comments
Post a Comment