Quiz: Cancellation and Exception Handling
Test yourself on what you've learned about cancellation and exception handling.
1
What is the extension function of cancelAndJoin
in cancellation?
A)
public suspend fun Job.cancelAndJoin() {
cancel()
return join()
}
B)
public suspend fun cancelAndJoin() {
cancel()
return join()
}
C)
public suspend fun Job.cancelAndJoin() {
return join()
}
D)
public suspend fun Job.cancelAndJoin() {
return join() + cancel ()
}
Question 1 of 50 attempted
Get hands-on with 1400+ tech skills courses.