![]() The C# FAQ blog has an entry describing this approach.įor the background tasks that need to frequently update the UI (and can’t be easily split into “checkpointed” Tasks), another approach is necessary. At these “checkpoints,” a task continuation is used to update the UI. Some of them update the UI infrequently, and can be easily broken into separate tasks which only update at each “checkpoint.” Other background tasks update the UI more frequently, and cannot be easily divided this way.įor the background tasks that infrequently update the UI, the common approach is to split them into separate Tasks with “checkpoints” in-between. However, BGW does have one benefit over the TPL: it is easier to use for background tasks that need to report progress to the UI.īackground tasks come in two basic flavors. It is time for this old class to retire as well. Similarly, the BackgroundWorker class has seen its heyday. There is (almost) no reason to use the old Thread class anymore. The TPL and higher-level abstractions (such as the Parallel class, Parallel LINQ, and the Reactive Extensions) will (hopefully) become the default approach for handling all multithreading situations. ![]() NET 4.0 Task Parallel Library respresents a huge shift in the way future multithreaded code will be written. ![]() See the new post Reporting Progress from Async Tasks for a better solution. ![]() Update, : The information in this post is old.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
June 2023
Categories |