Replies: 3 comments
-
@gbrackley Hi, the support for external event loops is there in Also, Do you have the possibility to already use |
Beta Was this translation helpful? Give feedback.
-
@sangelovic Thank you for the response. I had not been following the v2.0 branch. I've pulled it out and had a quick look and can see the expanded documentation and the support for both file descriptors. With the project I am doing, I will wait for the v2.0 code to be released (with the hope that it gets merged in the next few months). The implementation is doing bluetooth, rauc and other low speed dbus i/o (absolute i/o throughput is not an issue). Having additional file descriptors on the same i/o thread would greatly simplify concurrency/locking, and reduce having to manage another thread. What also seems clear is that I should be looking in the direction of libsystemd's sd-event (as you have pointed out) and not in the direction of libuv, libev, libevent, ... |
Beta Was this translation helpful? Give feedback.
-
Yes, v2.0 should be released in the upcoming week(s). I will ping you here. Having one I/O thread make sense, of course. Perhaps we can close the discussion thread now? |
Beta Was this translation helpful? Give feedback.
-
Hi,
I want to have an event processing loop that can also service additional low throughput file descriptor events/timers. From what I can see the connection implementation doesn't allowing adding more file descriptor to the poll loop (in the
waitForNextRequest()
method).The comments in the
IConnection.h
indicate thatgetEventLoopPollData()
can be used to implement your own loop. I can see how the sdbus file descriptor and events are exposed via this method. However I can't see how the internal event file descriptor (eventFd_
) of the Connection class implementation is exposed, and assume this is also required to be polled withPOLLIN
.The
loopExitFd_
would be specific to my implementation and wouldn't need to be exposed or used.Is my understanding correct? Has anyone implemented an external event loop thread? Can anyone share an example please? I'd prefer not to use block-copy inheritance of the
Connection
class. Thank you.Beta Was this translation helpful? Give feedback.
All reactions