pthreads disappearing

Marisa DeMeglio marisa@dinf.ne.jp
Thu May 13 05:13:00 GMT 2004


Hi,

I'm new to pthreads.  What I'm trying to do is have an
application with two parts:
a) main process
b) GUI thread (using GTK)

Periodically, the main process needs to interrupt
gtk_main (gtk's main loop) when there is new data
available from the server (well it's another local
process but referring to it as a server will probably
convey the point).  The server will call
main_process_dll->receiveData(data).  Then the main
process can interrupt gtk_main with a gsignal (which
is out of the scope of this list).  Otherwise, the GUI
thread needs to keep running until explicitly killed.

So, what I am seeing at the moment is when I create a
pthread, it runs for a short while and then
disappears. Does this have to do with the stack size? 
I am passing in NULL as the second parameter to
pthread_create().  Even when I run my test program
without using GTK (and instead use a while(1) loop), I
see the same behavior.

Any advice would be much appreciated.
Thanks!
Marisa



More information about the Pthreads-win32 mailing list