Refined dispatcher and threading. Added lifecycle registry

This commit is contained in:
Lyncoln
2026-10-09 16:40:48 -04:00
parent e6b2722708
commit 8d91b8d716
42 changed files with 294 additions and 76 deletions
+30
View File
@@ -0,0 +1,30 @@
import threading
from lifecycleregistry import registerLifecycle
from lifecyclemanager import manageLifecycle
threadlist = []
threadnum = 0
def buildThread(module, lifecycles):
global threadnum
threadnum += 1
threadname = f"thread.{threadnum}"
thread = threading.Thread(
target=manageLifecycle,
args=(module, lifecycles)
)
thread.start()
registryname = threadname
registryvalue = thread
lifecycles = registerLifecycle (module, lifecycles, registryname, registryvalue)
threadlist.append(thread)
print(threadlist)
print(lifecycles)
return threadnum, threadname, lifecycles, threadlist