It's like an interruption ...
No, absolutely not. There is a safe way to interrupt a thread when it is busy executing code. This causes a particularly unpleasant type of problem called a "re-login error." This is a mistake that firmware programmers struggle with when they implement interrupt handlers on embedded systems. Some information on this in this web page .
-, -. , . , . " ". , , , . , , .
Winforms , . , , , . Begin/Invoke invoke PostMessage(), , - .
, , , . , , GetMessage(). , . .
Invoke BeginInvoke Set() ManualResetEvent . , . , , , .
, , :
- , , .
- , BeginInvoke,
- / , - , .
- , BeginInvoke, , , , , . .
- Invoke BeginInvoke . , , - . , - . BeginInvoke over Invoke.
- , , . , . , . , .
- , , . , , , . , ObjectDisposedException - .