synchronization in matlab actor
The matlab actor starts a new matlab process in preinitialize and closes it in wrapup. Each instance of the actor in a model starts and stops a separate matlab process. However, they all synchronize on a shared object, which prevents concurrent matlab execution.
Ideally, the actors should be able to run concurrently. Why are they synchronized? (Maybe the matlab engine shared library is not thread-safe)?
If they cannot run concurrently, then only one matlab process should be used per JVM.