- APM and EAP are two different asynchronous programming modes prior to async/await.
- If APM does not block the main thread, then the completion notification (callback) will be executed in another thread, causing some problems with updating the UI.
- The notification events for EAP are performed in the main thread, and there is no UI interaction problem.
- Finally, we learned about the interaction between different threads under WinForm, as well as SynchronizationContext.
- APM is the first asynchronous programming method under. NET, which has been available since. NET1.0. In. NET2.0, Microsoft realized the problem with UI interaction in the callback function of APM and brought in a new EAP. APM and EAP coexist to. NET3.5, when in. NET4.0, Microsoft brings TPL, which is what we know about task programming, and. NET4.5 is the async/await that we are all aware of and can see. NET has been constantly improving, coupled with the recent continuous and open source community collaboration, cross-platform features such as the introduction of, we have reason to believe. NET will go as well as possible.
Development of. NET Multi-Threading