On 2008-01-17 15:26, Dirk Meyer wrote:
> ThreadCallback(object)
>
> MainThreadCallback(ThreadCallback):
>     ThreadCallback.__init__('main', ...)
>
> Thread(ThreadCallback):
>     ThreadCallback.__init__(None, ...)
>   

I wasn't really suggesting this as an implementation (conceding that
MainThreadCallback is actually a different beast entirely).

But I see the jobserver stuff as something independent of
ThreadCallback.  When I think of ThreadCallback, I think of a callable
that executes asynchronously in a thread.  The fact that I can tie this
to one named thread using jobserver is an additional feature, but I
might well want a ThreadCallback to connect to a signal that runs in a
new thread every time.

Maybe that's what ThreadCallback should do: run a callback in a new
thread every time.  This obviates the need for the Thread class (it can
be removed) -- it basically _is_ the Thread class except that it's a
callable.  And we can have a separate class to run a callback in a
specific thread: NamedThreadCallback (or whatever).  Maybe this is
derived from ThreadCallback or maybe it isn't.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to