Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gjt.sp.util
Class ThreadUtilities

    java.lang.Object
      org.gjt.sp.util.ThreadUtilities

    public class ThreadUtilities

extends java.lang.Object

The threadpool of jEdit. It uses a ExecutorService from the java.util.concurrent package. You can run `Task` or `Runnable` in it, Runnables will be encapsulated in Task.

Since:
  jEdit 4.4pre1

Method Summary
`static void` | `runInBackground(java.lang.Runnable runnable)` Run the runnable in the threadpool.
`static void` | `runInBackground(Task task)` Run the task in the threadpool.
`static void` | `runInDispatchThread(java.lang.Runnable runnable)` Run the runnable in EventDispatch Thread.
`static void` | `runInDispatchThreadAndWait(java.lang.Runnable runnable)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### runInDispatchThread

    public static void runInDispatchThread(java.lang.Runnable runnable)

  Run the runnable in EventDispatch Thread. If the current thread is EventDispatch, it will run immediately otherwise it will be queued in the DispatchThread The difference with VFSManager.runInAWTThread() method is that this one will not wait for IO Request before being executed

  Parameters:
    `runnable` - the runnable to run

### runInDispatchThreadAndWait

    public static void runInDispatchThreadAndWait(java.lang.Runnable runnable)

### runInBackground

    public static void runInBackground(java.lang.Runnable runnable)

  Run the runnable in the threadpool. The runnable will be encapsulated in a `Task`

  Parameters:
    `runnable` - the runnable to run
  See Also:
    `runInBackground(Task)`

### runInBackground

    public static void runInBackground(Task task)

  Run the task in the threadpool. The runnable will be encapsulated in a `Task`

  Parameters:
    `task` - the task to run

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD