Jason Tackaberry wrote:
> As I understand what you wrote, it sounds ok to me.  I've never used
> ThreadCallback so I don't know why you would use it over Thread.  If
> they basically do the same thing, let's merge them.

They do similar things. If you use a Thread, it will be started on
start() and do its job. The ThreadCallback gets a thread name to
execute it. So when you have 100 functions you want to call in a
thread, a Thread will spawn 100 threads while a ThreadCallback can
handle all in one thread or split them into two.

I have to think about if and how to make both classes one.

>> And why do we call MainThreadCallback using __call__? OK, we do the
>> same for Callback, but MainThreadCallback takes some time. Maybe the
>> function should be called start, too.
>
> IMHO anything with 'Callback' in the name must be callable.  In
> particular the cool thing about MainThreadCallback is that now we have a
> callable that will execute in the mainthread.  We can pass this to
> anything that accepts a callable, notably signal.connect.  I understand
> the logic behind your suggestion but I think it makes _more_ sense for
> MainThreadCallback to behave like the other Callback classes, which it
> does, which is good. :)

OK, in that case ThreadCallback is a bad name because it needs a start
function.


Dischi

-- 
"Alcohol doesn't solve any problem...but fuck it neither does milk"
--- A wise man?

Attachment: pgpS9aHstgXKL.pgp
Description: PGP signature

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to