Mark
11/01/2018, 2:10 AMsequence {}
but getting “Restricted suspending functions can only invoke member or extension suspending functions on their restricted coroutine scope”. I can’t seem to find any information about this. Any pointers please? https://pl.kotl.in/B1hRgy_2m Presumably I need to use a suspending extension function of CoroutineScope?gildor
11/01/2018, 2:35 AM@RestrictsSuspension
annotation docs
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.coroutines/-restricts-suspension/index.htmlMark
11/01/2018, 2:38 AMgildor
11/01/2018, 2:39 AMtoList()
would be lock the thread and it doesn’t sound as a good ideaMark
11/01/2018, 2:39 AMgildor
11/01/2018, 2:40 AMMark
11/01/2018, 2:42 AMgildor
11/01/2018, 2:42 AMChannels
Mark
11/01/2018, 2:43 AMsequence{}
is only useful for when calculating the next item is reasonably fast (i.e. non IO-blocking)?gildor
11/01/2018, 2:44 AMMark
11/01/2018, 2:46 AMgildor
11/01/2018, 2:48 AMMark
11/01/2018, 2:49 AMgildor
11/01/2018, 2:50 AMsend
will suspend until someone consumes this valueMark
11/01/2018, 2:52 AMgildor
11/01/2018, 2:52 AMsend
Mark
11/01/2018, 2:52 AMgildor
11/01/2018, 2:52 AM