PK_SESSION_ask_max_threads   

PK_ERROR_code_t                       PK_SESSION_ask_max_threads
(
--- received arguments ---
const PK_SESSION_ask_max_threads_o_t *options,

--- returned arguments ---
int                            *const max_threads
)


This function returns the maximum number of threads which Parasolid can
currently use internally (i.e. active SMP threads, not application threads).


This number depends on the values returned by PK_SESSION_ask_smp
('thread_format', 'n_threads' and 'n_processors' in PK_SESSION_smp_r_t) and on
the documented upper limit of SMP threads which the current version of
Parasolid can ever use (see documentation of PK_SESSION_smp_o_t).

If 'thread_format' is PK_thread_absolute_c then 'max_threads' is the smaller
of Parasolid's upper limit and 'n_threads'.

If 'thread_format' is PK_thread_per_processor_c then 'max_threads' is the
smaller of Parasolid's upper limit and 'n_threads' multiplied by
'n_processors'.

If 'thread_format' is PK_thread_disabled_c then 'max_threads' is 1.

If PK_SESSION_set_smp has not been called in the current session then SMP is
disabled and 'max_threads' is 1.