CRI ADX  Last Updated: 2025-05-07 13:34 p
Changing Thread Framework

Samples Directory

/cri/pc/samples/criatomex/thread_framework

Sample Description

/cri/common/smpdata/criatomex/
  • SampleProject.acf
  • AtomCueSheet.acb
  • AtomCueSheet.awb

Sample Explanation

To change the thread framework, specify the thread model when initializing the library.


Multi-thread mode
When CRI Atom is initialized in multi-thread mode, server processing is executed periodically in a high-priority thread separate from the main thread.
CriAtomExConfig atomex_config;
/* Initialize the library setting with default value */
/* Specify multithread mode */
/* Initialize */
criAtomEx_Initialize(&atomex_config);
CriBool criAtomEx_Initialize(const CriAtomExConfig *config, void *work, CriSint32 work_size)
Initialize the library.
#define criAtomEx_SetDefaultConfig(p_config)
Assign the default values to the configuration structure used for the library's initialization.
Definition: cri_le_atom_ex.h:322
@ CRIATOMEX_THREAD_MODEL_MULTI
Multithreading.
Definition: cri_le_atom_ex.h:1227
Configuration structure used to initialize the Atom libraryThis structure is used to specify the beha...
Definition: cri_le_atom_ex.h:1461
CriAtomExThreadModel thread_model
Threading model.
Definition: cri_le_atom_ex.h:1468


Single Thread Mode
When CRI Atom is initialized in single thread mode, server processing is executed in the criAtomEx_ExecuteMain function.
Therefore, application must take care of the execution timing and interval of the criAtomEx_ExecuteMain function and.
CriAtomExConfig atomex_config;
/* Initialize the library setting with default value */
/* Specify multithread mode */
/* Initialize */
criAtomEx_Initialize(&atomex_config);
@ CRIATOMEX_THREAD_MODEL_SINGLE
Single threading.
Definition: cri_le_atom_ex.h:1279


When you do not omit configuration parameters when initializing the library or creating handles, be sure to initialize the parameter structure with corresponding default value setting macro.