bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use of Thread::Cancel


From: Matt Scifo
Subject: Re: Use of Thread::Cancel
Date: Tue, 18 Nov 2003 12:08:29 -0800

On Tue, 2003-11-18 at 12:51, address@hidden wrote:
> Hi,
> 
> Just a couple of points:
> 1. Is it true that pthread library on Linux creates separate
> processes for individual threads? In that case could a system
> scale with 1000s of threads on Linux? (Can someone confirm this?)
> Also in that case wouldnt any thread interrupt mechanism require
> to use signals in the implementation? (Again, can someone confirm
> this?)
> 
I'm already running successfully with thousands of threads.  The only
issue I came across was having to tune my thread stack size to ensure
that I had enough memory to launch all the threads.

$ulimit -s -u
stack size            (kbytes, -s) 8192
max user processes            (-u) 7168


> 2. Also if its not too late you may want to take a look at ACE
> which has c++ wrappers for threads as well. The ACE wrappers are
> supposed to be more 'evolved' and platform independent. The 
> installation is huge though and learning curve may be steeper
> than for GNU Common CPP.
> ACE_Threads have methods like cancel, disableCancel, enableCancel
> that may be suitable for your purpose. Again, I dont know much
> about the underlying implementation (and the documentation is terse)
> 

I'll look into this.  My application only uses the commoncpp threads
implementation and the Buffer class (which I just stopped using because
it didn't implement a timed wait or immediately returnable wait).  I do
however like the fact that commoncpp has many classes and I was thinking
of utilizing more of them as my application matured, specifically the
socket classes.

Thanks

Matt





reply via email to

[Prev in Thread] Current Thread [Next in Thread]