blueloveTH 3 anni fa
parent
commit
1044475f70
2 ha cambiato i file con 3 aggiunte e 5 eliminazioni
  1. 2 4
      plugins/flutter/src/pocketpy.h
  2. 1 1
      plugins/godot/godot-cpp

+ 2 - 4
plugins/flutter/src/pocketpy.h

@@ -5026,13 +5026,11 @@ public:
     void terminate(){
         if(_state == THREAD_RUNNING || _state == THREAD_SUSPENDED){
             keyboardInterrupt();
-            while(_state != THREAD_FINISHED) {
 #ifdef __EMSCRIPTEN__
-            emscripten_sleep(20);
+            // no way to terminate safely
 #else
-            std::this_thread::sleep_for(std::chrono::milliseconds(20));
+            while(_state != THREAD_FINISHED);
 #endif
-            }
         }
     }
 

+ 1 - 1
plugins/godot/godot-cpp

@@ -1 +1 @@
-Subproject commit 3b6f3c85037a67fe1f8817ffa40532b3c1ecc728
+Subproject commit d3c5ec6fdf62217fb18c08c0e19ccea21d41ab18