Describe the bug
If two concurrent requests to the /technical endpoint should be served, a race condition occurs. Due to storing the model, as well as the currentModel as a struct field, it may be overwritten by loading new models into memory. This causes at least one error to one of the requests, which cannot process the model correctly. Therefore a threadsafe method should be implemented, which handles the loaded models respectively.
To Reproduce
Steps to reproduce the behavior:
Start two concurrent requests to /technical/<shareID A> and /techical/<shareID B>
At least one of the requests will fail due to memory corruption
Expected behavior
The server should be able to process concurrent requests which require two different models.
Desktop (please complete the following information):
Describe the bug If two concurrent requests to the
/technical
endpoint should be served, a race condition occurs. Due to storing themodel
, as well as thecurrentModel
as a struct field, it may be overwritten by loading new models into memory. This causes at least one error to one of the requests, which cannot process the model correctly. Therefore a threadsafe method should be implemented, which handles the loaded models respectively.To Reproduce Steps to reproduce the behavior:
/technical/<shareID A>
and/techical/<shareID B>
Expected behavior The server should be able to process concurrent requests which require two different models.
Desktop (please complete the following information):
Additional context
--