xtd 0.2.0
Loading...
Searching...
No Matches

◆ interrupt()

void xtd::threading::thread::interrupt ( )

Interrupts a thread that is in the xtd::threading::thread_state::wait_sleep_join thread state.

Remarks
If this thread is not currently blocked in a thread_state::wait, thread_state::sleep, or thread_state::join state, it will be interrupted when it next begins to block.
xtd::threading::thread_interrupted_exception is thrown in the interrupted thread, but not until the thread blocks. If the thread never blocks, the exception is never thrown, and thus the thread might complete without ever being interrupted.