Is there a way to use interruptions in Kotlin like in C programming?
I’m posting here because I haven’t found the answer to my question yet after numerous searches. Actually, I would like to know if, in Kotlin, we could interrupt the execution of the main program to run a callback function linked to the interruption and then go back to the normal execution of the main program. So when the interruption comes, the program needs to memorize where it has stopped to be able to resume at the same place after it has finished running the callback function