axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick van Beem" <patrick.van.b...@quintiq.com>
Subject RE: Multi-threading
Date Tue, 16 Dec 2008 12:27:04 GMT
Hello Bill

> Patrick, when building a multi-threaded Axis2C client I too was 
> concerned about the multiple environments.  Although your 
> statement is correct in a sense that each thread needs its own 
> environment/stub, these environments can in fact share much of 
> the underlying structures.  In practice, each thread needs its 
> own error stack, but it can certainly share the allocator and 
> logger.  And the configuration information is associated with 
> the allocator.  There is a primitive function 
> axutil_env_create_with_error_log_thread_pool() that lets you 
> share the substructures already created for the "global" environment 
> created once for the application.  This way the configuration 
> information is read only once.  Axutil_env_free_masked() lets 
> each thread free just its error stack upon termination, leaving 
> the allocator et.al. intact.  

Correct. I already use these. But afaik the configuration file is read when creating the stub.
And that should be done for each thread / call. So while many resources can indeed be shared,
the one needing the most (time-consuming) initialization (I think), can't. I think this would
be a great improvement for the future.

> I was not dealing with asynchronous operation in my application, 
> so I don't know if you might need a separate thread-pool for 
> each created environment.  

The current implementation of a thread pool in axis is no thread pool but a collection of
thread creation and deletion methods... So no...

Thank you for your input.

-- 

 
Patrick van Beem
Sr. Software engineer
 
Quintiq
 
T +31 (0) 73 691 07 39
F +31 (0) 73 691 07 54
M +31 (0) 06 15 01 65 83
E patrick.van.beem@quintiq.com
I www.quintiq.com



This message contains information that may be privileged or confidential and is the property
of Quintiq. It is only intended for the person to whom it is addressed. If you are not the
intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute
or use this message or any part thereof. If you have received this message in error, please
notify the sender immediately and delete all copies of this message. Please note that e-mails
are susceptible to change, therefore they are not binding.

Mime
View raw message