/sys$common/syshlp/helplib.hlb POSIX Threads, PTHREAD routines, pthread_setconcurrency, Description *Conan The Librarian (sorry for the slow response - running on an old VAX) |
This routine stores the value specified in the level argument in the "concurrency level" global setting for the calling thread's process. Because the Threads Library automatically manages the concurrency of all threads in a multithreaded process, it ignores this concurrency level value. "Concurrency level" is a parameter used to coerce "simple" 2- level schedulers into allowing application concurrency. The Threads Library supplies the maximum concurrency at all times, automatically. It has no need for coercion, and calls pthread_ setconcurrency() merely to determine the value returned by the next call to pthread_getconcurrency(). The concurrency level value has no effect on the behavior of a multithreaded program that uses the Threads Library. This routine is provided for Single UNIX Specification, Version 2 source code compatibility and has no other effect when called. After calling this routine, subsequent calls to the pthread_ getconcurrency() routine return the same value, until another call to pthread_setconcurrency() changes that value. The initial concurrency level is zero (0), indicating that the Threads Library manages the concurrency level. To indicate in a portable manner that the implementation is to resume control of concurrency level, call this routine with a level argument of zero (0). The concurrency level value can be obtained using the pthread_ getconcurrency() routine.
|