Swift 5.5 introduces Swift concurrency. It allows us to write asynchronous code in synchronous mechanism. Greatly reduce the complexity of asynchronous code.
Kotlin coroutine flow includes cold flow and hot flow. SharedFlow and StateFlow are two of the hot flows. They can broadcast values to several receivers, so can be used to implement the publisher-subscriber pattern.
Kotlin’s coroutines are used to replace threads. They do not block threads, and they can be cancelled. Coroutine core helps you manage the number of threads.
Grand Central Dispatch (GCD) provides efficient concurrent processing so that we don’t need to directly manage multiple threads. Its dispatch queues can execute tasks serially or concurrently.