Enable a thread‐creation failure limit for testing.
Synopsis
Declared in <bslmt_threadutil.h>
static
void
setThreadLimit(unsigned int n);
Description
Enable a thread creation limit. If set to non‐zero value n'th thread creation will fail. The limit is disabled by setting the limit to 0. Only intended to be used in tests to inject thread creation errors. Note that this can be called multiple times to reset the thread limit, e.g. between subtests for example.
Parameters
Name |
Description |
n |
creation count at which subsequent creates fail; 0 disables |
Created with MrDocs