EventSubscription.onReady
Arms a one-shot wakeup for when this subscription has something to read, or has ended.
Source and package
- Qualified name
-
io.github .libtmux .control .Event Subscription. on Ready - Package
- io.github.libtmux.control
- Declared in
EventSubscription- Distribution
- io.github.libtmux:libtmux
- Source
- libtmux/src/main/java/io/github/libtmux/control/EventSubscription.java
-
Description
Runs
callbackat once, on this thread, when a step is already waiting or the subscription has ended. Otherwise it runs once, on the control client's reader thread, when the first step arrives or the subscription ends, and is then disarmed: drain with#poll()until it is empty, then arm again. Checking and arming happen under the lock that delivery takes, so a step cannot slip between them unannounced.The callback runs on the thread delivering events, so it must not block: resume a waiting coroutine, complete a promise, and return. One that throws is logged and ignored, and delivery continues.
- Parameters
- Errors
-
-
Illegal
State – if a callback is already armed, or a stream or publisher owns this subscriptionException
-
Recorded calls
source callsThe Java reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls io.github.libtmux.control.EventSubscription.onReady.
Guides
task materialPages that discuss onReady.