Sunday, 15 July 2012

vb.net - Callback For Tasks -


I created a task using the following code

 for  (// pls Variables) Deam Task = (New System Threading. Tasks.TaskFactory ()). StartNew (sub) Download files (end) sub    

The job has been made to N and it works asynchronously, now I do not know how to add callback method for it. is. Can anyone ask me to add a callback for this?

Callback should be used to look like this: I ... left out for each. Personal sub StartTask_Click (The sender as the object, and the form of routing invitation) StartTask handles. Click the slow long task as the task = (New system. Threading.Task.Tokfater). StartAnu (Addressoff DoverSync) Longtask Continewith (Insert Work on Work) debug Print ("") and all '' '& lieutenant; Summary & gt; Called '' '' 'Called after DoWorkAsync Work Completion' / Summary & gt; '' '& Lt; Comment & gt; & Lt; / Comments & gt; Private sub work complete () debug Print ("full") end sub '' '& lt; Summary & gt; '' 'Task' '' written by & lt; / Summary & gt; '' '& Lt; Comment & gt; & Lt; / Comments & gt; Debug for I = 0 to 2000. Print ("Test") Next sub sub

No comments:

Post a Comment