libdbus Missing Async Calls

rony rony at wu.ac.at
Sun Jan 14 12:08:43 UTC 2018


Sorry, mixed up e-mail addresses and postings! :(

Another attempt...

---rony

On 13.01.2018 21:59, Lawrence D'Oliveiro wrote:

> On Sat, 13 Jan 2018 08:53:03 -0800, Thiago Macieira wrote:
>
>> On Friday, 12 January 2018 22:55:24 PST Lawrence D'Oliveiro wrote:
>>
>>> On Fri, 12 Jan 2018 22:23:15 -0800, Thiago Macieira wrote:
>>>> On Friday, 12 January 2018 00:17:09 PST Lawrence D'Oliveiro wrote:
>>>>> Well, one workaround is to do the blocking call on a separate
>>>>> thread
>>>>> <https://github.com/ldo/dbussy/commit/981395208b706d646b8b55873fcae8da09238fdd> ...
>>>> Which you're going to need if you're going to do multithreaded
>>>> programming anyway.
>>> Which I am trying to avoid--that being the whole point of async
>>> coroutines.  
>> Let me be clear: you CANNOT use threads with your design.  And by
>> "you", I mean both your code and the user's code that uses your API.
> First you say I’m going to need threads, next you say I “CANNOT” use
> threads.
>
> So are you agreeing with me, or disagreeing?

the point that everyone makes is that you need to use the same thread for sending and receiving
messages that created the DBus connection. Therefore you need to make sure that the dispatching is
done in the same thread that established the DBus connection.

What options (coroutines, threads) you supply to the users of your library is totally up to yourself! 

---rony

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dbus/attachments/20180114/d4bb2e6c/attachment.html>


More information about the dbus mailing list