From bc99d070991e6f53f4557e324d23a39468a21482 Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 25 Jun 2007 18:59:26 +0000 Subject: [PATCH] SIMPLE_THREADS implementation --- direct/src/showbase/ShowBase.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 1dfe4a9fa7..7b2e3905f5 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -51,14 +51,12 @@ __builtin__.NO_FADE_SORT_INDEX = 2000 #################################################### want_fifothreads = config.GetBool("want-fifothreads", 0) if want_fifothreads: - import threading - class HackGraphicsEngine(GraphicsEngine): def renderFrame(self): - if threading.currentThread().getName() == 'MainThread': + if isinstance(Thread.getCurrentThread(), MainThread): GraphicsEngine.renderFrame(self) else: - print 'renderFrame Not Main Thread %s'% (threading.currentThread().getName()) + print 'renderFrame Not Main Thread %s' % (repr(Thread.getCurrentThread()))