You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 17, 2023. It is now read-only.
This description is misleading, as the requests are not actually "taking place" | "being sent" on the UI thread at all. The requests are being initiated from and responses processed by the main thread but retrofit under the hood is enqueing them, which will result in them actually being run on a worker Thread. The log in the screenshot is logging the thead the response is processed on after the worker thread has finished.
It sounds pendantic but as this is a course on concurrency at present it's a little misleading. I can submit a PR to re-word this if desired.
Hey,
Reading https://play.kotlinlang.org/hands-on/Introduction%20to%20Coroutines%20and%20Channels/04_Suspend I have noticed an inaccuracy.
We have the below:
This description is misleading, as the requests are not actually "taking place" | "being sent" on the UI thread at all. The requests are being initiated from and responses processed by the main thread but retrofit under the hood is enqueing them, which will result in them actually being run on a worker
Thread
. The log in the screenshot is logging the thead the response is processed on after the worker thread has finished.It sounds pendantic but as this is a course on concurrency at present it's a little misleading. I can submit a PR to re-word this if desired.
Here is a call to the internal
enqueue
for reference https://github.com/square/retrofit/blob/master/retrofit/src/main/java/retrofit2/KotlinExtensions.kt#L36The text was updated successfully, but these errors were encountered: