1. Igor Fesenko
  2. FluentTask


Fluent Task


FluentTask allows you to run operations in separate thread yet receive success, failure and progress update on the WPF UI thread so that you can have a responsive UI and carry out expensive operations in background. It's convenient to use than BackgroundWorker component. No need to decare events and preserve stuffs in private variables to access it from different event callbacks. You can return data from parallel thread to the success/fail callback safely in a strongly typed manner.


new FluentTask<int>()
                     () =>
                             Console.WriteLine("Do work");
                             return (int)Math.Exp(new Random().NextDouble());
                 .OnTimeout(() => Console.WriteLine("Timeout"))