#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:13:29 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 AlbertCahalan):
Replying to [comment:4 tomeu]:
> Well, all services offered today by the Shell are fast enough. But this
could change some day. Any service that uses the network is potentially
very slow and shouldn't be called synchronously by an UI thread or by
another D-Bus service.
Slow network things are perfectly OK to do from the UI loop. You set the
network file descriptor to non-blocking, then use poll() or select() to
see when you can read/write without blocking.
> But anyway, the real problem here are dead locks. Having the same
process/thread/eventloop doing the UI and at the same time providing
generic services to activities and other services is going to cause dead
locks.
Sure you have a real deadlock? That tends to be more common when using
threads. Merely blocking (waiting for a network connection for example) is
cleanly solvable with non-blocking IO.
--
Ticket URL: <https://dev.laptop.org/ticket/2654#comment:5>
One Laptop Per Child <http://laptop.org/>
More information about the Bugs
mailing list