-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Interrupts are swallowed when a remote method call is done #150
Comments
Can you provide a sample for this? |
Sure, is a code excerpt enough for you? In my example I am accessing the wpa_supplicant dbus object and call the "CreateInterface" method with my wifi interface (mlan0). For a simpler example I set the interrupted state even before calling the method (although this might also happen inbetween).
The result of executing the example above is than:
I would expect the interrupted state to be true also after calling a method of an instance of the DBusInterface. Is there more clarification / example code needed? |
Issue should be fixed now in master and java16 branch. |
Very good, thank you. This should improve the usage in a threaded environment a lot. |
No real plans or roadmap. |
Okay thank you for the information. |
I ran into a problem when using dbus-java in a threaded environment were I need to interrupt the thread running dbus-java. I traced the problem and found the following:
In "org.freedesktop.dbus.messages.MethodCall" both "getReply" methods catch a possible ocurring InterruptedException and do not set the interrupted state (Thread.currentThread().interrupt()). This leads to my thread never being canceled in time correctly. I currently added a workaround where I listen for a thrown NoReply exception (which is the result of that method returning null) and then myself reset the interrupt state correctly.
It can easily be recreated by:
I would appreciate a fix in an upcoming version.
The text was updated successfully, but these errors were encountered: