org.rococoa.internal
Class MainThreadUtils

java.lang.Object
  extended by org.rococoa.internal.MainThreadUtils

public abstract class MainThreadUtils
extends java.lang.Object

Exists just to tidy up Foundation.

Author:
duncan

Constructor Summary
MainThreadUtils()
           
 
Method Summary
static
<T> T
callOnMainThread(RococoaLibrary rococoaLibrary, java.util.concurrent.Callable<T> callable)
          Return the result of calling callable on the main Cococoa thread.
static boolean isMainThread()
           
static void runOnMainThread(RococoaLibrary rococoaLibrary, java.lang.Runnable runnable, boolean waitUntilDone)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MainThreadUtils

public MainThreadUtils()
Method Detail

callOnMainThread

public static <T> T callOnMainThread(RococoaLibrary rococoaLibrary,
                                     java.util.concurrent.Callable<T> callable)
Return the result of calling callable on the main Cococoa thread.


runOnMainThread

public static void runOnMainThread(RococoaLibrary rococoaLibrary,
                                   java.lang.Runnable runnable,
                                   boolean waitUntilDone)
Parameters:
runnable - Run runnable on the main Cocoa thread.
waitUntilDone - A Boolean that specifies whether the current thread blocks until after the specified selector is performed on the receiver on the main thread.

isMainThread

public static boolean isMainThread()


Copyright © 2009. All Rights Reserved.