EAP is a model that has also been introduced to handle threading in an easier and elegant way. The Event-based asynchronous pattern forms few rules that you need to follow while following the pattern. The implementation of Event-based Asynchronous pattern has been widely accepted, which uses events to notify the caller with the changes to the thread.
In this recipe,
we are going to show an example of the
BackgroundWorker type rather than implementing a new EAP class which will use
ThreadPool in the background and run the method that is passed to it asynchronously. The
BackgroundWorker class has special features like
CompleteCallback, or even cancellation ...