← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 4124: Use global interpreter lock (GIL) in OpenGLRenderer.

 

------------------------------------------------------------
revno: 4124
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Thu 2014-07-31 18:09:05 +0200
message:
  Use global interpreter lock (GIL) in OpenGLRenderer.
  
  Closes LP:1349880, thanks Václav Šmilauer for the hint.
modified:
  pkg/common/OpenGLRenderer.cpp


--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'pkg/common/OpenGLRenderer.cpp'
--- pkg/common/OpenGLRenderer.cpp	2014-05-23 13:05:19 +0000
+++ pkg/common/OpenGLRenderer.cpp	2014-07-31 16:09:05 +0000
@@ -9,6 +9,7 @@
 #include<yade/core/Timing.hpp>
 #include<yade/core/Scene.hpp>
 #include<yade/pkg/common/Aabb.hpp>
+#include<yade/lib/pyutil/gil.hpp>
 
 #ifdef __APPLE__
 #  include <OpenGL/glu.h>
@@ -140,6 +141,7 @@
 
 void OpenGLRenderer::render(const shared_ptr<Scene>& _scene,Body::id_t selection){
 
+	gilLock lockgil;
 	if(!initDone) init();
 	assert(initDone);
 	selId = selection;