def __wrap(func):
        "Wraps a method so execution runs via an affinity engine."
        @functools.wraps(func)
        def box(self, *args, **kwargs):
            return self.__exec(func, self, *args, **kwargs)
        return box
Wraps a method so execution runs via an affinity engine.
recipes/Python/578152_threadboxpy/recipe-578152.py