Often I need to perform an expensive task and then display the results. Therefore, I am increasing the flow. Is there less code or a better way to do this than I am currently using?
Example:
ThreadStart job = new ThreadStart (delegate {
Search d = new Search ();
x = d.DoSomeWork();
InvokeOnMainThread (delegate {
ctl.Show (x);
});
});
- run this thread here ....
source
share