diff --git a/src/revpimodio2/__about__.py b/src/revpimodio2/__about__.py index e83737c..78874e4 100644 --- a/src/revpimodio2/__about__.py +++ b/src/revpimodio2/__about__.py @@ -3,4 +3,4 @@ __author__ = "Sven Sager " __copyright__ = "Copyright (C) 2023 Sven Sager" __license__ = "LGPLv2" -__version__ = "2.6.0" +__version__ = "2.6.1rc1" diff --git a/src/revpimodio2/device.py b/src/revpimodio2/device.py index 0f27359..6631e59 100644 --- a/src/revpimodio2/device.py +++ b/src/revpimodio2/device.py @@ -155,7 +155,7 @@ class Device(object): self.__my_io_list = [] self._selfupdate = False self._shared_procimg = False - self._shared_write = [] + self._shared_write = set() self.shared_procimg(parentmodio._shared_procimg) # Set with register # Wertzuweisung aus dict_device diff --git a/src/revpimodio2/io.py b/src/revpimodio2/io.py index 7e1fdfc..df72dc5 100644 --- a/src/revpimodio2/io.py +++ b/src/revpimodio2/io.py @@ -706,10 +706,9 @@ class IOBase(object): # Für Bitoperationen sperren self._parentdevice._filelock.acquire() - if self._parentdevice._shared_procimg \ - and self not in self._parentdevice._shared_write: + if self._parentdevice._shared_procimg: # Mark this IO for write operations - self._parentdevice._shared_write.append(self) + self._parentdevice._shared_write.add(self) # Hier gibt es immer nur ein byte, als int holen int_byte = self._parentdevice._ba_devdata[self._slc_address.start] @@ -743,11 +742,10 @@ class IOBase(object): ) ) - if self._parentdevice._shared_procimg \ - and self not in self._parentdevice._shared_write: + if self._parentdevice._shared_procimg: with self._parentdevice._filelock: # Mark this IO as changed - self._parentdevice._shared_write.append(self) + self._parentdevice._shared_write.add(self) self._parentdevice._ba_devdata[self._slc_address] = value