 |
PK_THREAD_ask_exclusion |
|
PK_ERROR_code_t PK_THREAD_ask_exclusion
(
--- returned arguments ---
PK_THREAD_exclusion_t *const exclusion, --- type of thread exclusion
PK_LOGICAL_t *const was_this_thread --- whether the calling thread
--- caused the exclusion
)
This function returns whether the Parasolid interface is currently excluding
other threads entering and whether the calling thread caused the exclusion.
After any fatal or serious PK errors, or other conditions when the session
should be rolled back, the Parasolid interface will exclude other threads and
only the thread that caused the exclusion can enter Parasolid. The only PK
functions that can be called from other threads without being queued until
after the exclusion are:
PK_SESSION_ask_function
PK_SESSION_is_in_kernel_2
PK_THREAD_ask_exclusion
PK_THREAD_ask_function
PK_THREAD_clear_exclusion (although this will always return an error)
PK_THREAD_is_in_kernel
If 'exclusion' is PK_THREAD_exclusion_fatal_c then the session should be
restarted. If 'exclusion' is PK_THREAD_exclusion_serious_c then either
PK_MARK_goto, PK_PMARK_goto_2, PK_SESSION_receive or PK_THREAD_clear_exclusion
must be called in the thread that has the return value of 'was_this_thread'
set to PK_LOGICAL_true before other threads can enter Parasolid again.
This function can only be called when the modeller is started.