SIMPLE_THREADS implementation

This commit is contained in:
David Rose 2007-06-25 18:59:26 +00:00
parent bc112ef132
commit bc99d07099

View File

@ -51,14 +51,12 @@ __builtin__.NO_FADE_SORT_INDEX = 2000
#################################################### ####################################################
want_fifothreads = config.GetBool("want-fifothreads", 0) want_fifothreads = config.GetBool("want-fifothreads", 0)
if want_fifothreads: if want_fifothreads:
import threading
class HackGraphicsEngine(GraphicsEngine): class HackGraphicsEngine(GraphicsEngine):
def renderFrame(self): def renderFrame(self):
if threading.currentThread().getName() == 'MainThread': if isinstance(Thread.getCurrentThread(), MainThread):
GraphicsEngine.renderFrame(self) GraphicsEngine.renderFrame(self)
else: else:
print 'renderFrame Not Main Thread %s'% (threading.currentThread().getName()) print 'renderFrame Not Main Thread %s' % (repr(Thread.getCurrentThread()))