Mono for Android
Subject: Re: [mono-android] waiting for result from runonuithread
Thanks, that works perfectly!
Martyn
From: monodroid-boun...@lists.ximian.com
[mailto:monodroid-boun...@lists.ximian.com] On Behalf Of Tossing, Chris
Sent: 17 November 2011 13:27
To: Discussions related to Mono fo
Thanks, that works perfectly!
Martyn
From: monodroid-boun...@lists.ximian.com
[mailto:monodroid-boun...@lists.ximian.com] On Behalf Of Tossing, Chris
Sent: 17 November 2011 13:27
To: Discussions related to Mono for Android
Subject: Re: [mono-android] waiting for result from
Sorry, remove the "private", since this is within a method:
bool success = false;
System.Threading.AutoResetEvent remoteCommandDoneEvent = new
System.Threading.AutoResetEvent(false);
RunOnUiThread(() => {
success = ExecuteRemoteCommand(command, parameter);
remoteCommandDoneEvent.Set();
});
remote
You can use an AutoResetEvent:
bool success = false;
private System.Threading.AutoResetEvent remoteCommandDoneEvent = new
System.Threading.AutoResetEvent(false);
RunOnUiThread(() => {
success = ExecuteRemoteCommand(command, parameter);
remoteCommandDoneEvent.Set();
});
remoteCommandDoneEvent.WaitO