catching exceptions from another thread

后端 未结 5 1399
名媛妹妹
名媛妹妹 2020-12-13 21:38

I have a method running in a seperate thread. The thread is created and started from a form in a windows application. If an exception is thrown from inside the thread, wha

5条回答
  •  轮回少年
    2020-12-13 21:57

    I totally agree with Dror. In a formal way we can call this structure as FaultContract. Fundamentally when an exception has happened in another thread, the client thread can hardly do any thing at that moment except that to collect that information and act accordingly in it's own theread. If the thereads are in different AppPool then there is an extra complexity of Serialization (that can be a seperate topic altogether).

提交回复
热议问题