Fixed dispatcher and registry

This commit is contained in:
Lyncoln
2026-10-09 03:18:21 -04:00
parent f4742f00e0
commit e6b2722708
21 changed files with 125 additions and 72 deletions
+31
View File
@@ -0,0 +1,31 @@
import threading
from lifecycleregistry import registerLifecycle
from lifecyclemanager import manageLifecycle
activethreads = []
threadnum = 0
def buildThread(module, state, lifecycles):
#for mode in ("continuous", "oneshot")
global threadnum
threadnum += 1
threadname = f"thread.{threadnum}"
thread = threading.Thread(
target=manageLifecycle,
args=(module, state)
)
thread.start()
registryname = threadname
registryvalue = thread
lifecycles = registerLifecycle (module, lifecycles, registryname, registryvalue)
activethreads.append(threadname)
print(activethreads)
print(lifecycles)
return threadnum, threadname, lifecycles, activethreads