Should I use Coroutines or Flow for Twitter4j?
# coroutines
i
Should I use Coroutines or Flow for Twitter4j?
🤔 3
e
message has been deleted
3
🔥 2
👍🏻 1
i
Interesting
g
Flow also based on coroutines, there is no real separation, it is one of APIs of kotlinx.coroutines. You are probably talking about suspend functions Flow represents a stream of events (from 0 to infinity) Suspend function and coroutines builders like runBlocking and launch is one time event and work as any other function So suspend functions work perfectly as API for asynchronous requests (like network, DB etc) and Flow perfect for listening events (notifications, events from user other service etc)