I would like to ask, is there any option to make function call in another process? For example:
def foo()
while True:
do_something...
#main function
def main()
foo()
some_other_actions...
#end
I would like to make foo running in some other process yet allow main() to normal end and allow user to write anything else in terminal, something like:
- user run in terminal main()
- main ends (foo function still working)
- user can run in terminal anything else (without switching terminal window) yet foo function still working in some other process
I know that there are some answers like, using threading or multiprocess but after using them, program will not stop until foo() function end. Is there any option to make such a thing in Python2.7?
Thanks in advance!