Skip to content

Blocking behavior on synchronous proxy method when called from synchronous adaptor method? #241

Answered by sangelovic
mgruhler asked this question in Q&A
Discussion options

You must be logged in to vote

Hi. This use case is a valid one and yes it shall work as you logically expect. Synchronously calling M2 on P while servicing the M1 call simply blocks the A (and P, too) from processing further incoming D-Bus messages. These are being enqueued, waiting until the M2 call -- and, subsequently, M1 call -- has finished. And, naturally, M1 won't finish until M2 has finished. M2 is a blocking call (given that I understand your situation correctly), thus blocks the M1 and M1 routing can only continue after M2 has finished.

Exactly such a use case is shown to work in sdbus-c++ stress tests: https://github.com/Kistler-Group/sdbus-cpp/blob/master/tests/stresstests/sdbus-c%2B%2B-stress-tests.cpp#L169

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mgruhler
Comment options

Answer selected by mgruhler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #236 on February 09, 2022 16:20.