public function dispatch()
    {
        $this->lock->acquire();

        $this->guardThatHistoryRepositoryDoesNotHaveMoreUnitsOfWork();

        $workloadRepository = $this->sourceRepository->diff(
            $this->historyRepository
        );

        foreach ($workloadRepository as $unitOfWork) {
            $this->executeMigration($unitOfWork);
        }

        $this->historyRepository->persist();

        $this->lock->release();
    }