Join Slack
Powered by
Hi all, do coroutines support the concept of sched...
# announcements
m
mhamade
02/01/2020, 10:04 PM
Hi all, do coroutines support the concept of scheduling a task to be run periodically?
d
diesieben07
02/01/2020, 10:06 PM
Because "sleeping" coroutines do not consume threads, you can simply do the following:
Copy code
launch { while (true) { launchTask() delay(<period>) } }
👍 1
m
mhamade
02/01/2020, 10:10 PM
I see, thanks!
Open in Slack
Previous
Next