On Mon, 2009-02-02 at 19:36 +0100, Dirk Meyer wrote:
> +thumb_lock = kaa.utils.Lock()
I'm always thinking of a mutex when I see Lock(), which of course does
not work between forked parent/child. And it's also only good for a
single use.
Maybe we can call it something like ForkLock (kind of lame, but at least
slightly more descriptive).
Or, how about a kaa.fork() which returns a ForkLock, which is basically
what kaa.utils.Lock is now, except also has properties pid and is_child.
thumbnailer = kaa.fork()
if thumbnailer.is_child:
[...]
thumbnailer.release()
[...]
sys.exit(1)
[...]
thumbnailer.wait()
I've always wanted a kaa.fork() anyway; something automatically create a
new thread notifier pipe if needed. kaa.daemonize() does it now
already, but that logic could be moved to kaa.fork().
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel