[mono-android] waiting for result from runonuithread

Tossing, Chris ctossing at touchcominc.com
Tue Nov 22 11:24:22 EST 2011


My pleasure.  I'm glad I could help.

Chris Tossing
Software Engineer
Touchcom
A G4S Technology Company
Direct Dial:      +1 (781) 457-0779
Cell:                +1 (847) 942-0359
ctossing at touchcominc.com<mailto:ctossing at touchcominc.com>
www.touchcominc.com<http://www.touchcominc.com/>
21 North Avenue, Burlington, Massachusetts USA

P Please consider the environment before printing this email

From: monodroid-bounces at lists.ximian.com [mailto:monodroid-bounces at lists.ximian.com] On Behalf Of Martyn Wendon
Sent: Tuesday, November 22, 2011 6:53 AM
To: Discussions related to Mono for Android
Subject: Re: [mono-android] waiting for result from runonuithread

Thanks, that works perfectly!


Martyn

From: monodroid-bounces at lists.ximian.com [mailto:monodroid-bounces at 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 runonuithread

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();
});
remoteCommandDoneEvent.WaitOne();


Chris Tossing

The details of this company are as follows:
Touchcom Inc, Registered Office: 21 North Avenue, Burlington, MA 01803.

This communication may contain information which is confidential, personal and/or privileged.

It is for the exclusive use of the intended recipient(s).
If you are not the intended recipient(s), please note that any distribution, forwarding, copying or use of this communication or the information in it is strictly prohibited.

Any personal views expressed in this e-mail are those of the individual sender and the company does not endorse or accept responsibility for them.

Prior to taking any action based upon this e-mail message, you should seek appropriate confirmation of its authenticity.

This e-mail has been scanned for all viruses by MessageLabs.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodroid/attachments/20111122/7e363cca/attachment.html 


More information about the Monodroid mailing list