Previous IDL Reference Guide Next

Thread Pool Keywords

Many of the system routines documented in this manual make use of the IDL thread pool. The thread pool is discussed in detail in Multithreading in IDL. System-wide use of the thread pool can be controlled with the CPU procedure, and the current system settings are visible via the !CPU system variable.

All system routines that use the thread pool accept the following keywords, which can be used to modify the default behavior for the duration of a single call. This allows you to modify the settings for a particular computation without affecting the global default settings of the IDL session.

Thread Pool Keywords

TPOOL_MAX_ELTS

Set this keyword to a non-zero value to set the maximum number of data elements involved in a computation that uses the thread pool. If the number of elements in the computation exceeds the number you specify, IDL will not use the thread pool for the computation. Setting this value to 0 removes any limit on the maximum number of elements, and any computation with at least TPOOL_MIN_ELTS will use the thread pool.

This keyword overrides the default value, given by !CPU.TPOOL_MAX_ELTS. See Possible Drawbacks to the Use of the IDL Thread Pool for discussion of the circumstances under which it may be useful to specify a maximum number of elements.

TPOOL_MIN_ELTS

Set this keyword to a non-zero value to set the minimum number of data elements involved in a computation that uses the thread pool. If the number of elements in the computation is less than the number you specify, IDL will not use the thread pool for the computation. Use this keyword to prevent IDL from using the thread pool on tasks that are too small to benefit from it.

This keyword overrides the default value, given by !CPU.TPOOL_MIN_ELTS. See Possible Drawbacks to the Use of the IDL Thread Pool for discussion of the circumstances under which it may be useful to specify a minimum number of elements.

TPOOL_NOTHREAD

Set this keyword to explicitly prevent IDL from using the thread pool for the current computation. If this keyword is set, IDL will use the non-threaded implementation of the routine even if the current settings of the !CPU system variable would allow use of the threaded implementation.

This keyword overrides the default value, given by !CPU.TPOOL_NTHREADS. See Possible Drawbacks to the Use of the IDL Thread Pool for discussion of the circumstances under which it may be useful to disable use of the thread pool entirely.

  IDL Online Help (March 06, 2007)