On Do, 23.04.20 21:31, www ([email protected]) wrote:

> Dear all,
>
>
> I write a new service and the service need wait the signal. At the same time, 
> I need to start a new thread to get information. If the two share the same 
> DBUS, the following problems will arise:
> terminate called after throwing an instance of 
> 'sdbusplus::exception::SdBusError'
> what():  sd_bus_call: org.freedesktop.DBus.Error.Timeout: Connection timed out
>
>
> Is there any good way to solve this problem?
> (I don't want to create a new DBUS in a new thread.)

sd-bus is not thread-safe. Use a seprate connection for each
thread. You cannot share connections between multiple shares (unless
of course, you lock around it yourself)

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
systemd-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to