I am converting Java program into C#.
I am wondering what is the .NET equivalent of Java's InterruptedException?
What Is an InterruptedException? An InterruptedException is thrown when a thread is interrupted while it's waiting, sleeping, or otherwise occupied. In other words, some code has called the interrupt() method on our thread. It's a checked exception, and many blocking operations in Java can throw it.
(b) RuntimeException signals a programming error; InterruptedException is not a result of a programming an error. InterruptedExceptions are particular complicated to handle, when they happen you need to care about the interrupt flag of the thread, and it can only happen in blocking operations.
It is ThreadInterruptedException
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With