Created
June 8, 2012 13:27
-
-
Save alanmcgovern/2895609 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Func () | |
{ | |
ThreadPool.QueueUserWorkItem (delegate { | |
InvokeOnMainThread (() => { | |
myLabel.Text = "Computation beginning..."; | |
}); | |
Thread.Sleep (10000); // Simulate downloading a large file or calculating lots of stuff | |
InvokeOnMainThread (() => { | |
myLabel.Text = "Computation complete!"; | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment