def worker(cls, dispatcher):

        while True:
            arg = dispatcher.getTask()

            task_type = arg[0] #(task_type, (arg1, arg2))
            task = arg[1]

            result = arg

            if task_type == "Probability":
                result = Probability(task)
            if task_type == "BoxWhisker":
                result = BoxWhisker(task[0], task[1])
            if task_type == "Summary":
                result = Statistics(task)
            if task_type == "InitEditValues":
                connection = SeriesService("sqlite:///:memory:")
                df = task[1]
                logger.debug("Load series from db")
                df.to_sql(name="DataValues", con=connection._session_factory.engine, flavor='sqlite', index = False, chunksize = 10000)
                logger.debug("done loading database")
                result = connection
            if task_type == "UpdateEditDF":
                connection = task[1]
                result = connection.get_all_values_df()

            result = (task_type, result)

            # save the result
            dispatcher.putResult(result)


    # The multiprocessing worker must not require any existing object for execution
The worker creates a TaskProcessor Object
dataset/ETHPy150Open ODM2/ODMToolsPython/odmtools/common/taskServer.py/TaskServerMP.worker