Some operations that change device configuration are already
synchronized by mutex. But not all. E.g. device/setButtonId
could
run in parallel with device/setJokerGroup
.
This change brings the threading model closer to my prosal for dss threading model that we did not have time to discuss yet. So I trigger the discussion by posting the code. Do we have real need to run these methods in paralel? Our code is not thread safe, reducing ammount of paralelism can only help with correctness.
I am quite confident that these additional locks do not introduce any new dead locks. These locks are taken when the stack is nearly empty, no locks are taken earlier. That defines lock ordering.
I believe that this change would prevent #17170, but as the case is not reproducible, I don't have hard facts.
ref #17170