adjorno
05/25/2018, 11:59 AMvoddan
05/25/2018, 12:40 PMwithContext(myContext) { ... }
voddan
05/25/2018, 12:41 PMDeferred
doesn't have a context AFAIK, only the coroutine that produced the deferred result doesadjorno
05/25/2018, 12:55 PMadjorno
05/25/2018, 12:56 PMVsevolod Tolstopyatov [JB]
05/25/2018, 1:09 PMretrofit2-kotlin-coroutines-adapter
, it wraps Call<T>
.
Deferred returned from retrofit is not launched via async
, see https://github.com/JakeWharton/retrofit2-kotlin-coroutines-adapter/blob/master/src/main/java/com/jakewharton/retrofit2/adapter/kotlin/coroutines/experimental/CoroutineCallAdapterFactory.kt#L113adjorno
05/25/2018, 1:43 PMzak.taccardi
05/25/2018, 4:15 PMlouiscad
05/26/2018, 7:50 AMgildor
05/26/2018, 1:09 PMadjorno
05/26/2018, 2:13 PMadjorno
05/26/2018, 2:14 PMgildor
05/26/2018, 2:21 PMgildor
05/26/2018, 2:22 PMgildor
05/26/2018, 2:24 PMgildor
05/26/2018, 2:26 PMgildor
05/26/2018, 2:29 PMadjorno
05/28/2018, 8:22 AMgildor
05/28/2018, 8:26 AMonly synchronous calls are supportedwhat do you mean? this library doesn’t expose to you okhttp API? What do you actually have now as public API that you can use and what is your problem?
adjorno
05/28/2018, 8:32 AMadjorno
05/28/2018, 8:36 AMgildor
05/28/2018, 8:45 AMgildor
05/28/2018, 8:46 AMadjorno
05/29/2018, 6:00 AMgildor
05/29/2018, 1:35 PMgildor
05/29/2018, 1:39 PMasync
coroutine builder with blocking request using your own coroutine dispatcherlouiscad
05/29/2018, 2:25 PMexecute()
on Call<T>
, and in this case, use the coroutineContext you want, although this doesn't allow you to support cancellationgildor
05/29/2018, 4:32 PM