Moved lifecycle registry out of createThread and into lifecycle manager since so that the registry is created INSIDE the thread.
This commit is contained in:
@@ -2,7 +2,7 @@ import threading
|
||||
from .lifecyclemanager import registerLifecycle
|
||||
from .lifecyclemanager import manageLifecycle
|
||||
|
||||
threadlist = []
|
||||
#threadlist = []
|
||||
#threadnum = 0
|
||||
|
||||
def buildThread(module, lifecycles):
|
||||
@@ -19,14 +19,12 @@ def buildThread(module, lifecycles):
|
||||
|
||||
thread.start()
|
||||
|
||||
registryname = thread.name
|
||||
registryvalue = thread
|
||||
|
||||
lifecycles = registerLifecycle (module, lifecycles, registryname, registryvalue)
|
||||
|
||||
threadlist.append(thread)
|
||||
|
||||
#print(threadlist)
|
||||
#print(lifecycles)
|
||||
#registryname = thread.name
|
||||
#registryvalue = thread
|
||||
|
||||
#lifecycles = registerLifecycle (module, lifecycles, thread.name, thread)
|
||||
|
||||
#threadlist.append(thread)
|
||||
|
||||
return thread, lifecycles
|
||||
|
||||
Reference in New Issue
Block a user