xtd 0.2.0
Loading...
Searching...
No Matches

◆ jthread() [4/4]

xtd::threading::jthread::jthread ( const xtd::threading::thread_start start,
int32  max_stack_size 
)

Initializes a new instance of the xtd::threading::jthread class, specifying the maximum stack size for the thread.

Parameters
startA xtd::threading::thread_start delegate that represents the methods to be invoked when this thread begins executing.
max_stack_sizeThe maximum stack size, in bytes, to be used by the thread, or 0 to use the default maximum stack size specified in the header for the executable.
Important For partially trusted code, max_stack_size is ignored if it is greater than the default stack size. No exception is thrown.
Exceptions
xtd::argument_exceptionThe start parameter is empty.
Remarks
A thread does not begin executing when it is created. To schedule the thread for execution, call the xtd::threading::jthread::start method.