C++ API: How do I set the thread stack size limit?

You can only change thread stack size through service the ServiceContainer.run() API method. See the C++ API reference for more information.