ribesg
10/12/2020, 12:37 PMisActive
instead of true
as an infinite while
loop condition in a coroutine if the loop calls suspending functions (delay
, among others)? I don’t think it changes anything, but maybe it makes things more clear to the reader? Thoughts?louiscad
10/12/2020, 12:38 PMrepeatWhileActive { }
for these purposes: https://github.com/LouisCAD/Splitties/tree/main/modules/coroutines#cancellable-infinite-loopsribesg
10/12/2020, 12:39 PMlouiscad
10/12/2020, 12:41 PMrepeatWhileActive
is more descriptive than while (true)
plus implicit exit/cancellation conditions.