How-to: load multiple files in parallel

It may happen that you need to process multiple files independent of each other and you would like to use HOOPS Exchange to do so, in order to perform data extraction, or conversions in a batch process.

Threads

HOOPS Exchange is thread-safe, and will detect if you are using it in multiple threads and will return an error if a function is already running in a parallel thread. This means HOOPS Exchange API is not multi-thread enabled because of kernel restrictions. Some functionalities are already parallelized by our API and take advantage of multiple threads and multiple processes. For the others, you will need to use the alternative proposed below.

From Release notes you will see this information:

Thread management. A new mechanism has been introduced to ensure that Exchange is used safely in a multithreaded environment. If a function is called on a particular thread while one is running, the A3D_LOCKED_LIBRARY error will be returned.

Alternative: processes

In order to use HOOPS Exchange in parallel, the alternative is to use multiple processes. This is what we are doing for our test infrastructure and we are converting our file database by dispatching files on different machines and on different processes.