Modifier and Type | Class and Description |
---|---|
static class |
Async.ThrowingRunnable
Like
Runnable , but allows the runOrThrow() method to throw an exception. |
Constructor and Description |
---|
Async() |
Modifier and Type | Method and Description |
---|---|
static Thread |
daemonThreadFrom(Runnable runnable) |
static Thread |
go(Runnable runnable)
Creates a new thread with the given Runnable, marks it daemon, starts it and returns the started thread.
|
static Thread |
go(Runnable runnable,
String threadName)
Creates a new thread with the given Runnable, marks it daemon, sets the name, starts it and returns the started
thread.
|
public Async()
public static Thread go(Runnable runnable)
runnable
- public static Thread go(Runnable runnable, String threadName)
runnable
- threadName
- the thread name.public static Thread daemonThreadFrom(Runnable runnable)