Skip to content

Improve thread-safety in NO_SYNC mode

Closes #1237

The problem is described here pytango#592 and the explanation of what is going on in #1237.

To solve it I propose, that we add a monitor to the MultiAttribute, based on shared_mutex, and divide all methods into two categories:

  1. allowed running in parallel, but have to paused if MultiAttribute are going to be changed
  2. not allowed running in parallel

I also found, that we had attribute configuration monitor, which was doing almost the same, but only for the changes of configuration and now it is always blocking. I think, it can be also changed to be based on schared mutex.

PS this MR works only in combination with pytango!681

PSS if I run code from issue, I still get random SEGFAULT (typically during add_attribute) - but this is 100% related to the no_db mode. Seems there is an issue with saving/reading file from hard drive, when you add/delete an attribute in cycle, but this is not a typical system use, so I do not think it is critical issue

Edited by Yury Matveyev

Merge request reports