Don't use "global" variables to pass varying data especially in multiprocess tasks, especially if "global" variable is changed somehow.