ruby-dbus
ruby-dbus copied to clipboard
dbus/message.rb:87:in `synchronize': can't be called from trap context (ThreadError)
Explanation: Holding mutex in trap is deadlockable. It is what ruby complained.
Possible solutions I found at this blog
Thanks for the report!
In what context are you getting this error? Do you have a simple test case for it?
BTW lps-it.fr seems to be down, but I copied its Google cache to a gist.
I'm writing a simple dbus client for modem manager and it's location (org.freedesktop.ModemManager1.Modem.Location) interface. When terminated by SIGINT I want the client to stop the GPS.
I do not have the example any more - I rewrote it and used pipe IO.select as shown in the mentioned blog. But simply any contruction like
Signal.trap("SIGINT") {
dbus_interface.method
}
sleep 10 while true
and sending the INT signal to process should raise the error message.