Connecting Tech Pros Worldwide Help | Site Map

gSOAP multithreaded?

 
LinkBack Thread Tools Search this Thread
  #1  
Old March 27th, 2006, 08:55 AM
Torsten Mueller
Guest
 
Posts: n/a
Default gSOAP multithreaded?

Does anybody use gSOAP 2.7 in a multithreaded environment? Are the
gSOAP functions (especially soap_serve) really thread safe? I use
pthreads on Solaris.

The main function has a loop like this:

while (true) {
int r=soap_accept(soap);
if (r>=0) {
pthread_create(&tid,NULL,
(thread_proc)process_request,
soap_copy(soap));
}
}

And the process_request function looks like this:

static void* process_request (struct soap* soap)
{
soap_serve(soap);
soap_destroy(soap);
soap_end(soap);
soap_done(soap);
soap_free(soap);

return NULL;
}

This code comes from one of the gSOAP examples but I don't trust him.
The example was designed just for one call. I have ten thousands of
calls, and perhaps 100 at the same time.

T.M.

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.