I am trying to write a program for process communication using Python and SimPy. If I put all code in a single function and call
simpy.Environment().process(function_one())
everything runs perfectly. However, if I call another function within function_one() like
def function_one(self):
function_two()
function_two will never be executed. function_two will be executed if I call it like this
def function_one(self):
simpy.Environment().process(function_two())
However, the rest of function_one will then executed and won't wait for function_two to execute. I obviously don't want to put all of my code in one function so any help would be appreciated.