Multithreaded Programming Guide

Set Thread Concurrency Level


pthread_setconcurrency(3THR) is provided for standards compliance. It is used by an application to inform the threads library of its desired concurrency level. For the threads implementation introduced in Solaris 9, this interface has no effect; all runnable threads are attached to LWPs.

#include <pthread.h>

int pthread_setconcurrency(int new_level);

Return Value

pthread_setconcurrency() fails if:


The value specified by new_level is negative.


The value specified by new_level would cause a system resource to be exceeded.