Browse Source

thread yields during egg read

David Rose 17 years ago
parent
commit
8137e8a039
2 changed files with 145 additions and 140 deletions
  1. 142 140
      panda/src/egg/parser.cxx.prebuilt
  2. 3 0
      panda/src/egg/parser.yxx

File diff suppressed because it is too large
+ 142 - 140
panda/src/egg/parser.cxx.prebuilt


+ 3 - 0
panda/src/egg/parser.yxx

@@ -43,6 +43,7 @@
 #include "coordinateSystem.h"
 #include "coordinateSystem.h"
 #include "pvector.h"
 #include "pvector.h"
 #include "dcast.h"
 #include "dcast.h"
+#include "thread.h"
 
 
 // Because our token type contains objects of type string, which
 // Because our token type contains objects of type string, which
 // require correct copy construction (and not simply memcpying), we
 // require correct copy construction (and not simply memcpying), we
@@ -1138,6 +1139,7 @@ group:
 {
 {
   $$ = egg_stack.back();
   $$ = egg_stack.back();
   egg_stack.pop_back();
   egg_stack.pop_back();
+  Thread::consider_yield();
 }
 }
         ;
         ;
 
 
@@ -2463,6 +2465,7 @@ table:
 {
 {
   $$ = egg_stack.back();
   $$ = egg_stack.back();
   egg_stack.pop_back();
   egg_stack.pop_back();
+  Thread::consider_yield();
 }
 }
         ;
         ;
 
 

Some files were not shown because too many files changed in this diff