I have read lots of articles on sync, async, multithreading and I think I picked up the main idea/concepts of each terminology. however, there are a couple things that makes me confused.
Before get into my questions, I apologize if any of my statement is incorrect because of misunderstanding. please point wrong statements out and correct them.
Feel free to rephrase/correct my statements if any looks messy. I appreciate your answer/any links to make my questions/confusions clear. Thank you in advanced.
Since no one really answered my question, I am trying to answer to my question by myself. it is based on my research and there possibly might be some wrong statements. I will appreciate if you can point out anything doesn't look good.
for extra notes on Kotlin Coroutines, if you only use Dispatchers.Main(for UI code/non blocking code) then it might not be multithreaded. However, your code eventually includes some suspend
functions for blocking operations since the purpose of using Kotlin Coroutines is to handle blocking operations. any suspend function are called even in Dispatchers.Main, that suspend function(blocking operation) will be switched to background context(Dispatchers.IO, Dispatchers.default) and done by background thread.
This is how I understand on sync, async, threading, Kotlin Coroutines so far.
Please point out and correct my answer if any seems not right or not clear. Also I appreciate your participation on this thread with your thoughts.
Thank you for reading my question and my own answer.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.