The Retrofit Documentation states the following:
For desktop applications callbacks will happen on the same thread that executed the HTTP request.
I've attempted to understand this by studying the Retrofit source (particularly RestAdapter.java
) and looking at a number of other similar SO questions (such as this) but I am still puzzled.
If I have a background thread which calls void getUserPhoto(@Path("id") int id, Callback<Photo> cb)
(for example), exactly how does this library execute a callback on that thread?