use ServerThread

This commit is contained in:
2023-04-10 21:08:05 +02:00
parent ce19dcf538
commit 2bd2dbd39f
+3 -5
View File
@@ -1,4 +1,5 @@
from pcaspy import SimpleServer
from pcaspy.tools import ServerThread
from .adjdrv import AdjustableDriver
@@ -13,7 +14,7 @@ DEFAULTS = {
}
class IOC:
class IOC(ServerThread):
def __init__(self, adjs, prefix="slic"):
# ensure prefix ends with colon
@@ -32,10 +33,7 @@ class IOC:
self.driver = AdjustableDriver(adjs)
def run(self):
while True:
self.server.process(0.1)
super().__init__(server)