QThread/Doc: update the docs on setStackSize()

There's some confusion about minimum and maximum.

Fixes: QTBUG-109512
Change-Id: I262c3499666e4f4fbcfbfffd17cc1d592bc658b3
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Philip Van Hoof <philip@codeminded.be>
(cherry picked from commit 3fc5ee5c2e4ed919b2939ca54a1958b8463eb404)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Thiago Macieira 2024-05-03 16:10:26 -07:00 committed by Qt Cherry-pick Bot
parent 5ee9da89af
commit 0de6328f06

View File

@ -496,10 +496,18 @@ bool QThread::isRunning() const
}
/*!
Sets the maximum stack size for the thread to \a stackSize. If \a
stackSize is greater than zero, the maximum stack size is set to
\a stackSize bytes, otherwise the maximum stack size is
automatically determined by the operating system.
Sets the stack size for the thread to \a stackSize. If \a stackSize is
zero, the operating system or runtime will choose a default value.
Otherwise, the thread's stack size will be the value provided (which may be
rounded up or down).
On most operating systems, the amount of memory allocated to serve the
stack will initially be smaller than \a stackSize and will grow as the
thread uses the stack. This parameter sets the maximum size it will be
allowed to grow to (that is, it sets the size of the virtual memory space
the stack is allowed to occupy).
This function can only be called before the thread is started.
\warning Most operating systems place minimum and maximum limits
on thread stack sizes. The thread will fail to start if the stack