[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xdg
Subject: Re: desktop vfs wiki page
From: nf2 <nf2 () scheinwelt ! at>
Date: 2005-03-05 20:43:59
Message-ID: 422A1A0F.3020105 () scheinwelt ! at
[Download RAW message or body]
Sean Middleditch wrote:
>I setup a wiki page for dvfs on FreeDesktop, ...
>
First: Congratulations to your wiki page!
I would like to add another argument against a single threaded daemon to
the "threading" section of the wiki, but i don't know how to put it into
simple words.
A single threaded daemon which forwards events created by backends has
another problem not described yet and that's the flow-control issue with
a async event based system. If the socket or pipe to the VFS client
happens to be "full" you need a way to stop the backend sending
messages. Otherwise your daemon main loop might get blocked or you have
to drop or buffer messages.
This problem has been described in a recent thread which was VFS client
related, but the problem seems to apply to the daemon also. Have a look
at the "alternating bitburger" protocol to see how complicated this can
become. In KIO this problem is solved by taking the event "source"
file-descriptor out of the main loop select statement...
http://lists.freedesktop.org/archives/xdg/2005-January/005863.html
http://lists.freedesktop.org/archives/xdg/2005-January/005865.html
If you have a thread per VFS client connection in the daemon and a
push/pull interface for backends this seems to be easier to handle.
Norbert
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic