Threads and waits
- From: Fernando Apesteguía <fernando apesteguia gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Threads and waits
- Date: Wed, 15 Feb 2006 16:26:01 +0100
Hi,
I have an app. that runs two threads, the main one and other thread that
collects information from files. I launch the thread by calling
pthread_create and here comes my first question
¿Should I use g_thread_create instead? Now I have no problems with these
pthreads and I can perform mutual exclusion with gdk_threads_enter() and
gdk_threads_leave() so I'm not sure about change the kind of thread.
Under some conditions I would like the collector thread to make a pause. I
don't know how to do it with POSIX functions. I've seen Glib's API
documentation and I'm not sure how could I make this. ¿Should I use a Gcond?
As I can see in documentation, g_thread_yield is not recommended to be used.
Thanks in advance!!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]