#2654 HIGH Trial-3: Sugar Shell is offering D-Bus services in the UI loop
Zarro Boogs per Child
bugtracker at laptop.org
Tue Aug 7 13:31:57 EDT 2007
#2654: Sugar Shell is offering D-Bus services in the UI loop
---------------------+------------------------------------------------------
Reporter: tomeu | Owner: tomeu
Type: defect | Status: new
Priority: high | Milestone: Trial-3
Component: sugar | Version:
Resolution: | Keywords:
Verified: 0 |
---------------------+------------------------------------------------------
Comment (by smcv):
Slow network things are only OK to do in the UI loop if you do them
asynchronously. The problem, as far as I'm aware, is that the UI part of
the Shell does synchronous things (as in: call a method over D-Bus, block
until the method returns, carry on with the main loop). This is a
requirement imposed by the "friendly" API wrappers used by the UI. If done
carefully, this is acceptable for a pure UI, but it's usually unacceptable
for something that provides a D-Bus service - as long as the UI part's
D-Bus call is blocking, the service's methods will also block.
Writing nice asynchronous APIs is difficult, and whenever it's suggested
that all access to (some D-Bus service) should be asynchronous, several
developers pop up complaining that that would make developing apps that
use that service too hard.
(At some point I want to do some work on improving the API of asynchronous
calls in dbus-python, but for the forseeable future I have my hands full
doing collaboration.)
--
Ticket URL: <http://dev.laptop.org/ticket/2654#comment:6>
One Laptop Per Child <http://laptop.org/>
More information about the Bugs
mailing list