[omniORB] Thread stack size (again)

Sai-Lai Lo S.Lo@uk.research.att.com
23 Sep 1999 19:09:46 +0100


>>>>> Bruce Visscher writes:

> While I think this would be great if it could be done, I fear this might
> be a little complicated to implement.  What I had in mind was something
> a little simpler.

> As a minium add:

> class omni_thread {
>   //...
>   static int stack_size();
>   static void stack_size(int);
> };

> A value of 0 would mean use the O/S supplied default.  Omni_thread
> constructors would then use this value in a call to
> pthread_attr_setstacksize or whatever is available for the given O/S.

This seems reasonable. Only drawback is we are changing the interface.
I think we are alright with unices shared libraries. Windows are OK as well
I guess because the omnithread DLL is built to resolve by name. Otherwise,
we have to bump up the library version number.

> You could get more elaborate and add an optional argument to the
> omni_thread constructors that if set would override the default.  If you
> did this then you could have an omniORB parameter for the stack size of
> a worker thread (even if you eliminated all "undisciplined" uses of
> stack within omniORB, you might still come across a server method that
> required a lot of stack space: maybe something heavily recursive).

Not very keen on another ORB configuration parameter. If one wants bigger
stack, one would like to have it for both client and server threads I
think.

Sai-Lai

-- 
Sai-Lai Lo                                   S.Lo@uk.research.att.com
AT&T Laboratories Cambridge           WWW:   http://www.uk.research.att.com 
24a Trumpington Street                Tel:   +44 1223 343000
Cambridge CB2 1QA                     Fax:   +44 1223 313542
ENGLAND