MCPcopy Create free account
hub / github.com/ActiveState/code / __wrap

Method __wrap

recipes/Python/578152_threadboxpy/recipe-578152.py:70–75  ·  view source on GitHub ↗

Wraps a method so execution runs via an affinity engine.

(func)

Source from the content-addressed store, hash-verified

68
69 @staticmethod
70 def __wrap(func):
71 "Wraps a method so execution runs via an affinity engine."
72 @functools.wraps(func)
73 def box(self, *args, **kwargs):
74 return self.__exec(func, self, *args, **kwargs)
75 return box
76
77 @classmethod
78 def __new(meta, cls, *args, **kwargs):

Callers 1

__new__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected