{"action":"closed","issue":{"url":"https://api.github.com/repos/Legrandgroup/robotframework-bonjourlibrary/issues/1","labels_url":"https://api.github.com/repos/Legrandgroup/robotframework-bonjourlibrary/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/Legrandgroup/robotframework-bonjourlibrary/issues/1/comments","events_url":"https://api.github.com/repos/Legrandgroup/robotframework-bonjourlibrary/issues/1/events","html_url":"https://github.com/Legrandgroup/robotframework-bonjourlibrary/issues/1","id":102981268,"number":1,"title":"Library has issues when combined with other D-Bus-based test libraries","user":{"login":"lionelains","id":10399276,"avatar_url":"https://avatars.githubusercontent.com/u/10399276?v=3","gravatar_id":"","url":"https://api.github.com/users/lionelains","html_url":"https://github.com/lionelains","followers_url":"https://api.github.com/users/lionelains/followers","following_url":"https://api.github.com/users/lionelains/following{/other_user}","gists_url":"https://api.github.com/users/lionelains/gists{/gist_id}","starred_url":"https://api.github.com/users/lionelains/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lionelains/subscriptions","organizations_url":"https://api.github.com/users/lionelains/orgs","repos_url":"https://api.github.com/users/lionelains/repos","events_url":"https://api.github.com/users/lionelains/events{/privacy}","received_events_url":"https://api.github.com/users/lionelains/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-25T08:56:56Z","updated_at":"2015-08-25T09:31:34Z","closed_at":"2015-08-25T09:31:34Z","body":"When BonjourLibrary is running side by side (within the RF process) with another thread that is running the D-Bus (gobject) mainloop, the services are not displayed properly.\r\nThis is due to the architecture of Avahi:\r\nWhen browsing for services, we must perform a call to Avahi's D-Bus method method AvahiBrowser() (in AvahiWrapper.browse_service_type())\r\nBut when we do so, the mainloop must not be running because signals describing all known services are sent right away after this call... if the mainloop is running, signals are sent before we even have the chance to register signal handlers to catch the result of AvahiBrowser().\r\nWe must wait the call to AvahiBrowser() to register our signal handlers because the oject on which we should listen for signals is the result value of AvahiBrowser().\r\nMost Python implementations thus do not run the mainloop until signal handlers are setup.\r\nOnce signal handlers are setup, we run the mainloop and catch the whole list.\r\nThe issue with RF is that the BonjourLibrary will run in the same process as other libraries. Even if BonjourLibrary stops the mainloop, other libraries may (this is the case for robotframework-dhcpclientlibrary and robotframework-dhcpserverlibrary) continue to run the mainloop and thus signals will be missed."}}