[omniORB] Thread stack size (again)
Sai-Lai Lo
S.Lo@uk.research.att.com
23 Sep 1999 20:22:30 +0100
I've added the static functions to the omnithread library:
class omni_thread {
static void stacksize(unsigned long sz=0);
static unsigned long stacksize();
// Use this value as the stack size when spawning a new thread.
// The default value (0) means that the thread library default is
// to be used.
};
The update is available on the CVS server.
I am in favour of this change rather than changing the ctor signature
because we can maintain shared library compatibility with the older version.
May be we can revisit the ctor solution before we release 3.0.
Sai-Lai
>>>>> Sai-Lai Lo 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.
--
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