You have started a long-running coroutine whose job you have assigned to a variable named task. If the need arose, how could you abort the coroutine? val task = launch { // long running job}

Question:You have started a long-running coroutine whose job you have assigned to a variable named task. If the need arose, how could you abort the coroutine? val task = launch { // long running job}

1.Task.join()

2.Task.abort()

3.Job.stop()

4.Task.cancel()


Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!