YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.util.ExitHandoff Class Reference

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...

Collaboration diagram for de.yaacc.util.ExitHandoff:
Collaboration graph

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.
 

Detailed Description

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).

Member Function Documentation

◆ run()

static void de.yaacc.util.ExitHandoff.run ( List< String > names,
List< ExitSequence.Step > steps,
Executor workers,
MainThread main,
long boundMillis,
Then then )
static

Returns at once.

names and steps are parallel lists.

Referenced by de.yaacc.util.ExitHandoff.run().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: