[CLAM] Programming with clam threads

Vegard Sandvold vegard.sandvold at notam02.no
Tue Jan 17 01:02:24 PST 2006

Hi David,

thanks for the help!

> 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.

This example is very illustrating, better than the Thread example. It
would also be good to have examples on using the other methods of the
Thread class, like Sleep().

>> * 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 does the thread behave if it terminates on its own before Stop() is


Crystalline solid-solution alloys have unit cell dimensions that are
frequently linear with concentration.
- Vegards' Law

More information about the clam-users mailing list