Re: desktop vfs wiki page



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






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]