On Mon, Mar 1, 2010 at 3:16 PM, Enlightenment SVN
<no-re...@enlightenment.org> wrote:
> +    /* TODO:
> +     * Should add a lock here, so that several programs starting at the same
> +     * time wont run several copies of efreet_desktop_cache_create
> +     *
> +     * Or do the right thing and run the exe with ecore_exe
> +     */
> +    if (!ecore_file_exists(efreet_desktop_cache_file()))
> +        system(PACKAGE_BIN_DIR "/efreet_desktop_cache_create");
> +    /* TODO: Need file monitor on cache in case it is updated */
> +    cache = eet_open(efreet_desktop_cache_file(), EET_FILE_MODE_READ);

really, this is race-prone. Go with dbus for update notifications,
file monitoring and activation. The DBus server will take care to just
create one instance of the application when it is not running.
Basically you just need to call the method on the interface and that's
it.

And no: going dbus here is not going slow or hurting performance.
We're not sharing cache data over dbus, just using it as simple and
reliable IPC that manages to start/restart (on die) the required
services. The api is easy to use, asynchronous and we already use it
for other parts of E (like hal).

BR,

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to