@SingletonOverride(implFor=ConcurrencyService.class) public class ConcurrencyServiceGwt extends ConcurrencyServiceAbstract
ConcurrencyServiceAbstract.EnviroMap, ConcurrencyServiceAbstract.WrappedRunnable| Constructor and Description |
|---|
ConcurrencyServiceGwt() |
| Modifier and Type | Method and Description |
|---|---|
protected ConcurrentEnvironment |
initializeEnvironment(Thread key,
Thread.UncaughtExceptionHandler params) |
AsyncLock |
newLock() |
double |
now() |
void |
runDeferred(Runnable cmd)
Runs the given command in a new environment, after all finalies have been
processed.
|
void |
runEventually(Runnable cmd)
Runs the command eventually, most likely on an unused thread.
|
void |
runFinally(Runnable cmd)
Runs the given command after the work queue for the current environment
is drained.
|
void |
runTimeout(Runnable cmd,
int millisToWait)
Wait (at least) a given number of milliseconds to perform a task.
|
boolean |
trySleep(float millis)
Attempts to sleep, if the current thread is not interrupted.
|
callback, currentEnvironment, flush, getFuturesThread, initMap, isMultiThreaded, kill, newProcess, newThread, resolve, threadFlushTime, threadStartTime, wrapprotected ConcurrentEnvironment initializeEnvironment(Thread key, Thread.UncaughtExceptionHandler params)
initializeEnvironment in class ConcurrencyServiceAbstractpublic void runDeferred(Runnable cmd)
ConcurrencyServicerunDeferred in interface ConcurrencyServicerunDeferred in class ConcurrencyServiceAbstractcmd - - The task to run.public void runFinally(Runnable cmd)
ConcurrencyServicerunFinally in interface ConcurrencyServicerunFinally in class ConcurrencyServiceAbstractcmd - - The command to run after the work queue is drained.public void runTimeout(Runnable cmd, int millisToWait)
ConcurrencyServicecmd - - The command to run.millisToWait - - A minimum of milliseconds to wait.public void runEventually(Runnable cmd)
ConcurrencyServicerunEventually in interface ConcurrencyServicerunEventually in class ConcurrencyServiceAbstractcmd - - A command to run whenever there is time.
No guarantee is made about how soon or how later the process is run.
A best-effort is made to use warm threads with nothing better to do
to process eventually commands.public AsyncLock newLock()
public boolean trySleep(float millis)
ConcurrencyServicetrySleep in interface ConcurrencyServicetrySleep in class ConcurrencyServiceAbstractmillis - - The millis to wait. Floating point converts to nanos.public double now()
now in interface ConcurrencyServicenow in class ConcurrencyServiceAbstractTimeService.birth().Copyright © December 07, 2012–2015 The Internet Party. All rights reserved.