Threads management


This is my first post to the list, so hello to all. :-)

I'm learning gtk, and I have a little problem with the threads. I'm
writting a basic .wav player. I throw the sound in a thread, doing this:

if (!g_thread_supported()) g_thread_init (NULL);
thread1 = g_thread_create (&play_sound,

play_sound is, surprisingly, the function that plays the sound.

Well, the problem comes when I try to do something with the sound.
Pausing it, stoping it, closing the aplication...

I've tried things like that:

void close_app (GtkWidget *widget, gpointer data) {
g_thread_exit (thread1);
gtk_main_quit ();

but it don't works. Can someone help me with that problem?

Thank you very much. :-)

tapia@xxxxxxxxx | c~~p ,---------.
tapia@xxxxxxxxxxxxxxxxxxxxx | ,---'oo ) \
cesar.garcia.tapia@xxxxxxxxxxxxx|( O O )/
--------------------------------| `=^=' / | \ , . / | \\ |-----'| / | ||__| |_|__|