[CLAM] Programming with clam threads

David Garcia Garzon dgarcia at iua.upf.es
Fri Jan 13 11:31:09 PST 2006

A Divendres 13 Gener 2006 18:21, Vegard Sandvold va escriure:
> is it possible to get some help on using the CLAM::Thread class? 
> The example provided with the source code is not very illustrating.

I'll take a closer look at it.

> * Is the call to CLAM::Thread:Start() blocking or not?

Calling start, just starts the thread and returns. Stop does block until the 
thread yields by exiting its the function.

> * How should I control the execution of the thread once it has started?

Take a look to the BlockingNetworkPlayer class (0.9.0preX). It uses 
CLAM::Thread conveniently. The class controls a thread that runs a Network on 
its main loop, and the object responds to Play/Stop messages by playing and 
stoping that thread execution. Even if you don't have a Network you can apply 
the same technique.

David García Garzón <david.garcia at removespam.iua.upf.es>
Phone: 034 93 542 21 99
Music Technology Group, Institut Universitari de l'Audiovisual
Universitat Pompeu Fabra

More information about the clam-users mailing list