Refined dispatcher and threading. Added lifecycle registry
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
from createdispatch import buildDispatch
|
||||
from createthread import buildThread
|
||||
from dispatchstate import buildState
|
||||
|
||||
import threading
|
||||
|
||||
def dispatchRequest(request, lifecycles):
|
||||
|
||||
module, mode = buildDispatch(request)
|
||||
|
||||
mode, lifecycles = buildState(module, mode, lifecycles)
|
||||
|
||||
if mode == "stop":
|
||||
return lifecycles
|
||||
|
||||
else:
|
||||
threadnum, threadname, lifecycles, threadlist = buildThread(module, lifecycles)
|
||||
|
||||
#print("Active Threads")
|
||||
#print(threadlist)
|
||||
|
||||
return threadnum, threadname, lifecycles, threadlist
|
||||
Reference in New Issue
Block a user