There are three different ways to incorporate Aster Scoring SDK in a multithreaded system:
- The scorer is not shared across multiple threads. Each thread creates its own scorer object and there is no sharing of model or configuration across threads. There are as many scorer objects as the number of parallel execution threads.
- The scorer is initialized and configured by a single thread (main process) and the configured scorer is shared across multiple threads for parallel execution.
- The scorer is initialized by a single thread (main process) and the initialized scorer is shared across multiple threads. The scorer is configured by the first thread that makes the configure() call. To change the scorer configuration (for example, if there is a change in model or a parameter), the scorer must first be reset using the reset() call and then reconfigured. In case of multiple configuration calls, all but the first configuration call are ignored by the scorer.