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 registerLifecycle
|
||||||
from .lifecyclemanager import manageLifecycle
|
from .lifecyclemanager import manageLifecycle
|
||||||
|
|
||||||
threadlist = []
|
#threadlist = []
|
||||||
#threadnum = 0
|
#threadnum = 0
|
||||||
|
|
||||||
def buildThread(module, lifecycles):
|
def buildThread(module, lifecycles):
|
||||||
@@ -19,14 +19,12 @@ def buildThread(module, lifecycles):
|
|||||||
|
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
registryname = thread.name
|
|
||||||
registryvalue = thread
|
|
||||||
|
|
||||||
lifecycles = registerLifecycle (module, lifecycles, registryname, registryvalue)
|
|
||||||
|
|
||||||
threadlist.append(thread)
|
|
||||||
|
|
||||||
#print(threadlist)
|
|
||||||
#print(lifecycles)
|
#print(lifecycles)
|
||||||
|
#registryname = thread.name
|
||||||
|
#registryvalue = thread
|
||||||
|
|
||||||
|
#lifecycles = registerLifecycle (module, lifecycles, thread.name, thread)
|
||||||
|
|
||||||
|
#threadlist.append(thread)
|
||||||
|
|
||||||
return thread, lifecycles
|
return thread, lifecycles
|
||||||
|
|||||||
Reference in New Issue
Block a user