Assimp
v3.1.1 (June 2014)
|
Threading
Overview
This page discusses both assimps scalability in threaded environments and the precautions to be taken in order to use it from multiple threads concurrently.
Thread-safety / using Assimp concurrently from several threads
The library can be accessed by multiple threads simultaneously, as long as the following prerequisites are fulfilled:
- Users of the C++-API should ensure that they use a dedicated Assimp::Importer instance for each thread. Constructing instances of Assimp::Importer is expensive, so it might be a good idea to let every thread maintain its own thread-local instance (which can be used to load as many files as necessary).
- The C-API is thread safe.
- When supplying custom IO logic, one must make sure the underlying implementation is thread-safe.
- Custom log streams or logger replacements have to be thread-safe, too.
Multiple concurrent imports may or may not be beneficial, however. For certain file formats in conjunction with little or no post processing IO times tend to be the performance bottleneck. Intense post processing together with 'slow' file formats like X or Collada might scale well with multiple concurrent imports.
Internal threading
Internal multi-threading is not currently implemented.
Generated on Sun Feb 21 2016 19:42:29 for Assimp by 1.8.11