Pārlūkot izejas kodu

thread yields during egg read

David Rose 17 gadi atpakaļ
vecāks
revīzija
8137e8a039
2 mainītis faili ar 145 papildinājumiem un 140 dzēšanām
  1. 142 140
      panda/src/egg/parser.cxx.prebuilt
  2. 3 0
      panda/src/egg/parser.yxx

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 142 - 140
panda/src/egg/parser.cxx.prebuilt


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

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

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels