Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old March 27th, 2006, 09: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


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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 network members.
Post your question now . . .
It's fast and it's free

Popular Articles