On 2002-04-19 18:04:40 -0800, james.zhao wrote:
> Hi,dear friends,
> I'm new programmer in pth family and not good at english.So I have to
> look for help.  I use pth to write a server run on linux system, and
> learn it from pth manual,but I find that if more connect request has
> exist at same time, the connection can't be created rapidly,and with
> the more connection to establish ,the CPU status percent not increase!
> Why?
> 
> Who know it,please let me know, thank you very much!

What does each connection do?  Since Pth is non-preemptive, if a
connection does work that does not use Pth calls, then the connection
will block other connections.

For example, if a connection makes a query to an SQL database, this may
block the server while the query is in process.  It is possible this can
be avoided by using the "hard" syscalls in Pth, since this will
intercept the I/O operations in libraries and allow other threads in
your application to proceed.

-- 
Shane
Carpe Diem

p.s.  If you want to send me your code (or part of it), off-list, then
      I'll be happy to have a look.
______________________________________________________________________
GNU Portable Threads (Pth)            http://www.gnu.org/software/pth/
User Support Mailing List                            [EMAIL PROTECTED]
Automated List Manager (Majordomo)           [EMAIL PROTECTED]

Reply via email to