Created a thread that handles de getFlows, function