Re: Serious problem with win32 pthreads crashing and c++ class

2003-10-22 Thread Larry Hall
At 10:02 PM 10/22/2003, Arash Partow you wrote: >Hi Ross, > >What you've just said now really baffeles me cause, the pthread-win32 page >is being hosted by red-hat which makes cygwin: >http://sources.redhat.com/pthreads-win32/ or is this address just a mirror >from somewhere else? Red Hat hosts

Re: Serious problem with win32 pthreads crashing and c++ class

2003-10-22 Thread Arash Partow
Hi Ross, What you've just said now really baffeles me cause, the pthread-win32 page is being hosted by red-hat which makes cygwin: http://sources.redhat.com/pthreads-win32/ or is this address just a mirror from somewhere else? In any case I've obtained the cygwin version of gcc and other tool chai

Re: Serious problem with win32 pthreads crashing and c++ class

2003-10-22 Thread Arash Partow
Hi Thomas, You don't know how much of a relief it is for me to hear that its not my fault (or not entirely anywayz ;)). I'm planning on updating the test-case code so that it will capture a ctrl+c and terminate all remaining threads in a graceful manner, and also setup the option to enter a comman

Re: Serious problem with win32 pthreads crashing and c++ class

2003-10-22 Thread Arash Partow
Hi Ross, I'm using the Cygwin tool-chain and use the cygwin G++ (3.3.1 cygming special) to compile, hence ending up with the unix emulation layer. I don't use mingw32 cause of my porting requirements to *nixs. I've made the attr variable global within the class in its private section, however the

Re: Serious problem with win32 pthreads crashing and c++ class

2003-10-22 Thread Thomas Pfaff
Arash Partow wrote: The prototype initially creates 700 threads all of which are contained in a vector (threadList), each thread does some "simple" string processing (basically tokenize a string) and then exists. On completion of the thread, the thread sets its own state in the thread-class to dead

Re: Serious problem with win32 pthreads crashing and c++ class

2003-10-21 Thread Arash Partow
Hi Ross, A slight correction: I replaced: pthread_create(&threadID,NULL,&(Thread::threadFunction),this); pthread_detach(threadID); With: pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); pthread_create(&threadID,&attr,&(Thread::threadFunct

Re: Serious problem with win32 pthreads crashing and c++ class

2003-10-21 Thread Arash Partow
Hi Ross, I replaced: pthread_create(&threadID,NULL,&(Thread::threadFunction),this); With: pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); pthread_create(&threadID,&attr,&(Thread::threadFunction),this); pthread_detach(threadID); However

Re: Serious problem with win32 pthreads crashing and c++ class

2003-10-21 Thread Arash Partow
Hi Robert, The prototype initially creates 700 threads all of which are contained in a vector (threadList), each thread does some "simple" string processing (basically tokenize a string) and then exists. On completion of the thread, the thread sets its own state in the thread-class to dead. Sou

Re: Serious problem with win32 pthreads crashing and c++ class

2003-10-21 Thread Robert Collins
On Tue, 2003-10-21 at 18:09, Arash Partow wrote: > The prototype initially creates 700 threads all of which are contained in a > vector (threadList), each thread does some "simple" string processing > (basically tokenize a string) and then exists. On completion of the thread, > the thread sets its

Serious problem with win32 pthreads crashing and c++ class

2003-10-21 Thread Arash Partow
Hi All, I'm a long-time reader, first-time poster. I've been doing some work lately with posix threads, mainly trying to build a very simple c++ wrapper for Posix threads, and well have come up to a stumbling point on the win32 platform with a simple prototype i had built utilizing this c++ wrappe

Serious problem with win32 pthreads crashing and c++ class

2003-10-21 Thread Arash Partow
Hi All, I'm a long-time reader, first-time poster. I've been doing some work lately with posix threads, mainly trying to build a very simple c++ wrapper for Posix threads, and well have come up to a stumbling point on the win32 platform with a simple prototype i had built utilizing this c++ wrappe