diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/input/InputTransport.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/input/InputTransport.h b/include/input/InputTransport.h index 750e170c24..2d64872beb 100644 --- a/include/input/InputTransport.h +++ b/include/input/InputTransport.h @@ -290,6 +290,17 @@ public: */ bool probablyHasInput() const; + /* Wait until there is a message in the channel. + * + * The |timeout| specifies how long to block waiting for an input event to appear. Negative + * values are not allowed. + * + * In some cases returning before timeout expiration can happen without a message available. + * This could happen after the channel was closed on the other side. Another possible reason + * is incorrect setup of the channel. + */ + void waitForMessage(std::chrono::milliseconds timeout) const; + /* Return a new object that has a duplicate of this channel's fd. */ std::unique_ptr<InputChannel> dup() const; |