mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
SIMPLE_THREADS implementation
This commit is contained in:
parent
bc112ef132
commit
bc99d07099
@ -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()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user