Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbus/message.rb:87:in `synchronize': can't be called from trap context (ThreadError) #58

Open
tomasjura opened this issue Feb 15, 2016 · 2 comments

Comments

@tomasjura
Copy link

Explanation: Holding mutex in trap is deadlockable. It is what ruby complained.

Possible solutions I found at this blog

@mvidner
Copy link
Owner

mvidner commented Feb 17, 2016

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.

@tomasjura
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants