thread stack size

thread stack size

Is it possible to specify the stack size for the TBB threads? From looking at the source code this does not seem to be possible.

It is my experience that different platforms have different default stack sizes for threads started by pthread_create(). For example, the convex hull test cases don't run on IBM AIX unless I explicitly increase the thread stack size. It seems to me that an optional stack size argument inthe task_scheduler_init class would solve this issue. If no stack size is specified, the defaults are taken. Otherwise the user supplied value is used.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You are right. There's no easy way to set the stack size and this is something we should fix. As you suggest, an optional second argument on task_scheduler_init would be the way to go. Technically, we'll do this as a two-argument constructor without a default argument, and retain the old single-argument constructor. That way old .exe files will still run correctly with the new version of the library.

Leave a Comment

Please sign in to add a comment. Not a member? Join today