|
YAACC - UPNP Client and Server
|
Ends things that may wait (a remote player sleeps and polls, up to 30 s, on the thread that ends it) without ever making the main thread wait (review W2 of Group 12A). More...

Classes | |
| interface | MainThread |
| The main thread: where the hand-over runs. More... | |
| class | Outcome |
| What the hand-over is told. | |
| interface | Then |
| The hand-over, on the main thread. More... | |
Static Public Member Functions | |
| static void | run (List< String > names, List< ExitSequence.Step > steps, Executor workers, MainThread main, long boundMillis, Then then) |
| Returns at once. | |
Ends things that may wait (a remote player sleeps and polls, up to 30 s, on the thread that ends it) without ever making the main thread wait (review W2 of Group 12A).
Every step runs on a thread of its own; the caller returns at once. The hand-over (Then) runs on the main thread, once: when every step has ended (posted by the last one), or after boundMillis (a delayed post made up front), whichever comes first. A step that is still running then is named in the outcome and left to run: the process ends soon and the threads are daemons.
Plain Java: the main thread is the MainThread seam (a looper handler in the app, a queue in the tests).
|
static |
Returns at once.
names and steps are parallel lists.
Referenced by de.yaacc.util.ExitHandoff.run().

