Runs a call that may block for ever (a read on a provider's pipe) on its OWN daemon thread and waits for it a bounded time.
More...
Runs a call that may block for ever (a read on a provider's pipe) on its OWN daemon thread and waits for it a bounded time.
Plain Java.
-
When the time is up the caller gets control back at once and
onAbandon runs on the CALLER's thread: that is where the blocked resource is closed from another thread (closing a file descriptor wakes a blocked libcore read with an exception).
-
A worker that stays stuck anyway is abandoned, not waited for: it is counted, and beyond
maxAbandoned stuck workers a new call is refused instead of starting yet another thread. A worker that wakes up later finds out (abandoned is passed to the work), and a result it still produces goes to disposeLate, never to anybody else.
-
Unlike
BoundedCall there is no shared pool: an abandoned worker does not take a place away from the next call.
◆ AbandonableCall()
| de.yaacc.share.AbandonableCall.AbandonableCall |
( |
int | maxAbandoned, |
|
|
String | threadName ) |
- Parameters
-
| maxAbandoned | how many abandoned workers may be alive at the same time, at least 1 |
| threadName | the name of the worker threads |
◆ abandonedAliveCount()
| int de.yaacc.share.AbandonableCall.abandonedAliveCount |
( |
| ) |
|
The documentation for this class was generated from the following file:
- /github/workspace/yaacc/src/main/java/de/yaacc/share/AbandonableCall.java