forked from Kistler-Group/sdbus-cpp
refactor: let callbacks take message objects by value (#367)
Signatures of callbacks async_reply_handler, signal_handler, message_handler and property_set_callback were modified to take input message objects by value, as opposed to non-const ref. The callee assumes ownership of the message. This API is more idiomatic, more expressive, cleaner and safer. Move semantics is used to pass messages to the callback handlers. In some cases, this also improves performance.
This commit is contained in:
@@ -257,14 +257,16 @@ v1.6.0
|
||||
|
||||
v2.0.0
|
||||
- Breaking changes in API/ABI/behavior:
|
||||
- In *synchronous* D-Bus calls, the proxy now **always** blocks the connection for concurrent use until the call finishes (with either a received reply,
|
||||
an error, or time out). If this creates a connection contention issue in your multi-threaded design, use short-lived, light-weight proxies, or call
|
||||
the method in an asynchronous way.
|
||||
- The `PollData` struct has been extended with a new data member: `eventFd`. All hooks with external event loops shall be modified to poll on this fd as well.
|
||||
- `PollData::timeout_usec` was renamed to `PollData::timeout` and its type has been changed to `std::chrono::microseconds`. This member now holds directly
|
||||
what before had to be obtained through `PollData::getAbsoluteTimeout()` call.
|
||||
- `PollData::getRelativeTimeout()` return type was changed to `std::chrono::microseconds`.
|
||||
- `IConnection::processPendingRequest()` was renamed to `IConnection::processPendingEvent()`.
|
||||
- In *synchronous* D-Bus calls, the proxy now **always** blocks the connection for concurrent use until the call finishes (with either a received reply,
|
||||
an error, or time out). If this creates a connection contention issue in your multi-threaded design, use short-lived, light-weight proxies, or call
|
||||
the method in an asynchronous way.
|
||||
- Signatures of callbacks `async_reply_handler`, `signal_handler`, `message_handler` and `property_set_callback` were modified to take input message objects
|
||||
by value, as opposed to non-const ref. Callee assumes ownership of the message. This API is more idiomatic, cleaner and safer.
|
||||
- The `PollData` struct has been extended with a new data member: `eventFd`. All hooks with external event loops shall be modified to poll on this fd as well.
|
||||
- `PollData::timeout_usec` was renamed to `PollData::timeout` and its type has been changed to `std::chrono::microseconds`. This member now holds directly
|
||||
what before had to be obtained through `PollData::getAbsoluteTimeout()` call.
|
||||
- `PollData::getRelativeTimeout()` return type was changed to `std::chrono::microseconds`.
|
||||
- `IConnection::processPendingRequest()` was renamed to `IConnection::processPendingEvent()`.
|
||||
- Systemd of at least v238 is required to compile sdbus-c++
|
||||
- A proper fix for timeout handling
|
||||
- Fix for external event loops in which the event loop thread ID was not correctly initialized (now fixed and simplified by not needing the thread ID anymore)
|
||||
|
||||
Reference in New Issue
Block a user