const char* ControlConcurrency_ns ( environ_ns*  env,   const char*  command,   const char*  value )

This function is used to control how Netica operates in multi-threaded environments.

You can call it repeatedly with different values of command and value to make several settings.

If command is the string "ExternalThreads", then value may be one of:
Serialize    All calls to Netica functions are serialized by blocking at the entrance to API functions, and waiting until all other Netica API functions are completed before proceeding. This will result in correct behaviour under all multi-threading environments, but may result in delays for some of your threads if other of your threads are requesting time-consuming operations.
OptimizeSafely    Netica will do thread synchronization/waiting so that only one thread can operate on a Bayes net at a time, but different threads can operate on different Bayes nets independently, without any waiting.
CallerGuaranteesSafety    Netica does not do any thread synchronization or waiting, which means that you must manage that (which can result in failure if not done right). Only use this in a single-threaded environment (or only one thread with access to Netica), or with consultation from Norsys.
    
The default value for ExternalThreads is OptimizeSafely. In versions previous to 5.02 the default was Serialize.

Other commands/values will soon be available.

Version:

Versions 5.02 and greater have this function.

See also:

NewRandomGenerator_ns    In multi-thread environments, can be used to make software deterministic, by having a separate random generator for each thread
LimitMemoryUsage_ns    May want to allocate more memory in a multi-threaded environment