Threads management
- From: Tapia <tapia eitig com>
- To: Lista GTK <gtk-app-devel-list gnome org>
- Subject: Threads management
- Date: 31 Mar 2002 16:56:27 +0200
Hello.
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,
file_name,
FALSE,
NULL);
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 eitig com | c~~p ,---------.
tapia users sourceforge net | ,---'oo ) \
cesar garcia tapia hispalinux es|( O O )/
--------------------------------| `=^=' /
http://www.eitig.com | \ , . /
http://www.es.gnome.org | \\ |-----'| /
http://lucas.hispalinux.es | ||__| |_|__|
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]