Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
fun saveUserTasks(userId: Int) {
val user = loadUser(userId)
println("user loaded")
// save loaded user
// pause execution
// resume execution
// restore saved user
val tasks = loadTasks(user)
println("tasks loaded")
// save loaded tasks
// pause execution
// resume execution
// restore saved tasks
saveTasks(tasks)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment