Exemplo n.º 1
0
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)
Exemplo n.º 2
0
	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)
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
	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)
Exemplo n.º 5
0
 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)
Exemplo n.º 6
0
 def indexAll():
     import appinfo
     for dir in appinfo.musicdirs:
         utils.asyncCall(lambda: indexSearchDir(dir),
                         name="create search index")
Exemplo n.º 7
0
	def indexAll():
		import appinfo
		for dir in appinfo.musicdirs:
			utils.asyncCall(lambda: indexSearchDir(dir), name="create search index")