/
Imatest IT in multi-threaded and multi-process environments

Imatest IT in multi-threaded and multi-process environments

Imatest IT uses the Matlab runtime library which is a single-threaded routine that is not thread-safe.

If your tester application uses multiple threads, you should restrict all the parts that call upon the Imatest library to a single thread.

If your tester application uses multiple processes be careful about using busy waiting in order to check for the results of the test to occur.  Without a sleep statement inside your loop, the rapidly looping process will prevent context switching to other processes, which will prevent them from running and consume a large amount of CPU resources causing both processes to freeze.

See Also

If you want to run multiple processes with Imatest calculations, please see:

Related content

Best Practices for Calling Imatest IT Libraries
Best Practices for Calling Imatest IT Libraries
More like this
Calling Imatest IT from MATLAB
Calling Imatest IT from MATLAB
More like this
Debugging Imatest IT
Debugging Imatest IT
More like this
Imatest does not start, unable to read MAT-file
Imatest does not start, unable to read MAT-file
More like this
Error Message: “An unhandled exception of type ‘System.BadImageFormatException'”
Error Message: “An unhandled exception of type ‘System.BadImageFormatException'”
More like this
Imatest freezing on macOS for 2021.1 and prior
Imatest freezing on macOS for 2021.1 and prior
More like this