fix timeout handling
* Despite what is documented in sd_bus_get_timeout(3), the timeout
returned is actually an absolute time point of Linux's CLOCK_MONOTONIC
clock. Hence, we first have to subtract the current time from the
timeout in order to get a relative time that can be passed to poll.
* For async call timeouts to reliably work, we need a way to notify the
event loop of a connection that is currently blocked waiting in poll.
I.e. assume the event loop thread entered poll with a timeout set to
T1. Afterwards, the main thread starts an async call C with a timeout
T2 < T1. In order for C to be canceled after its timeout T1 has
elapsed, we have to be able to notify the event loop so that it can
update its poll data.
Co-authored-by: Urs Ritzmann <ursritzmann@protonmail.ch>
Co-authored-by: Lukasz Marcul <lukasz.marcul@onemeter.com>
The underlying bus was thread_local, but the design assumption that Variants built on top of that instance won't outlive the thread was incorrect. In stress tests, Variants were moved (and this is completely legal) to a different thread.
* Add preliminary changes for async server methods
* Refactor the Message concept and break it into distinctive types
* Continue working on async server methods (high-level API mainly)
* Continue developing support for async server
* Finishing async server methods
* Finishing async server methods (fixing tests & cleaning up)
* A little code cleaning
* Add unit tests for type traits of free functions
* Support for generating async server methods in stub headers
* Update ChangeLog for v0.3.0
* Update the tutorial with how to use async server-side methods
* Update the TOC in sdbus-c++ tutorial
* Update numbering in TOC
* Remove unnecessary code
* Final cleanups