Contents tagged with Task

  • C# Task, ContinueWith

    Hello everybody,

    today I want to write few words about Task Paralel library, and in particular two methods: Task.Start, and Task.ContinueWith.

    Snippet

    System.Threading.Tasks.Task t = new System.Threading.Tasks.Task(

                    () => {

                        //some heavy code like intensive calculations, reading from db, etc.

                        

                    }

                );

                System.Threading.Tasks.Task t2 = t.ContinueWith(

                    (a) => {

                    //Code to update UI

                    },

                    TaskScheduler.FromCurrentSynchronizationContext()

                );

    Following template has the following structure. You need to split your code … more

  • Search for duplicates

    Hello everybody,

    Here is just shorp version of application which searches for duplicates in folder.

    In  downloadable archive you can find my implementation of searcher with Task, ContinueWith and some other new features of C# 4.5 more