public class Async extends java.lang.Object
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 java.lang.Thread |
daemonThreadFrom(java.lang.Runnable runnable) |
static java.lang.Thread |
go(java.lang.Runnable runnable)
Creates a new thread with the given Runnable, marks it daemon, starts it and returns the started thread.
|
static java.lang.Thread |
go(java.lang.Runnable runnable,
java.lang.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 java.lang.Thread go(java.lang.Runnable runnable)
runnable
- public static java.lang.Thread go(java.lang.Runnable runnable, java.lang.String threadName)
runnable
- threadName
- the thread name.public static java.lang.Thread daemonThreadFrom(java.lang.Runnable runnable)