Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is .NET Equivalent of InterruptedException (Java)?

Tags:

c#

.net

I am converting Java program into C#.

I am wondering what is the .NET equivalent of Java's InterruptedException?

like image 461
Rita Avatar asked Dec 14 '10 01:12

Rita


People also ask

What is InterruptedException in Java?

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.

Is InterruptedException a runtime exception?

(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.


1 Answers

It is ThreadInterruptedException.

like image 51
jason Avatar answered Nov 15 '22 08:11

jason