def fork_test3(mustExec=False): """ Another indirect test for `fork()`. I get a SIGILL on this test case. See: <http://ask.sagemath.org/question/2627/sigill-in-forked-process> """ _fork_test_func(range(10)) import utils utils.asyncCall(func=_fork_test_func)
def calcAndSet(self, attrib): from utils import asyncCall res = asyncCall( func = getattr(self, "_calc_" + attrib), name = "calc Song(%s) %s" % (self.userString.encode("utf-8"), attrib)) for attr,value in res.items(): setattr(self, attr, value) return res.get(attrib, None)
def calcAndSet(self, attrib): from utils import asyncCall res = asyncCall(func=getattr(self, "_calc_" + attrib), name="calc Song(%s) %s" % (self.userString.encode("utf-8"), attrib)) for attr, value in res.items(): setattr(self, attr, value) return res.get(attrib, None)
def calcAndSet(self, attrib): from utils import asyncCall, ForwardedKeyboardInterrupt try: res = asyncCall( func = getattr(self, "_calc_" + attrib), name = "calc Song(%s) %s" % (self.userString.encode("utf-8"), attrib)) except ForwardedKeyboardInterrupt: return None for attr,value in res.items(): setattr(self, attr, value) return res.get(attrib, None)
def calcAndSet(self, attrib): from utils import asyncCall, ForwardedKeyboardInterrupt try: res = asyncCall(func=getattr(self, "_calc_" + attrib), name="calc Song(%s) %s" % (self.userString.encode("utf-8"), attrib)) except ForwardedKeyboardInterrupt: return None for attr, value in res.items(): setattr(self, attr, value) return res.get(attrib, None)
def indexAll(): import appinfo for dir in appinfo.musicdirs: utils.asyncCall(lambda: indexSearchDir(dir), name="create search index")