I've got some same code which is designed to make sure an Action is invoked
on the UI thread.
Here it is here:

https://gist.github.com/3284433

It uses this to determine if it's running on the UI thread.  Is code the
most efficient way to do this?  It seems a bit baroque to be marshalling
out over a *bool_objc_msgSend *type method.


      private static bool IsMainThread()

    {

      return Messaging.bool_objc_msgSend(GetClassHandle("NSThread"),
newSelector(
"isMainThread").Handle);

    }


Thanks!

-- 
*Phil *Cockfield
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to