mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
up
This commit is contained in:
parent
3d610e4fdc
commit
fcdff94be3
@ -1,4 +1,4 @@
|
|||||||
## 0.6.0+3
|
## 0.6.0+4
|
||||||
|
|
||||||
+ Break change
|
+ Break change
|
||||||
|
|
||||||
|
@ -50,7 +50,8 @@ class _MyAppState extends State<MyApp> {
|
|||||||
buffer.write(needMoreLines ? '... $text' : '>>> $text\n');
|
buffer.write(needMoreLines ? '... $text' : '>>> $text\n');
|
||||||
});
|
});
|
||||||
if (text == "exit()") exit(0);
|
if (text == "exit()") exit(0);
|
||||||
needMoreLines = repl.input(text) == 0;
|
repl.input(text);
|
||||||
|
needMoreLines = repl.last_input_result() == 0;
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: pocketpy
|
name: pocketpy
|
||||||
description: A lightweight Python interpreter for game engines.
|
description: A lightweight Python interpreter for game engines.
|
||||||
version: 0.6.0+3
|
version: 0.6.0+4
|
||||||
homepage: https://pocketpy.dev
|
homepage: https://pocketpy.dev
|
||||||
repository: https://github.com/blueloveth/pocketpy
|
repository: https://github.com/blueloveth/pocketpy
|
||||||
|
|
||||||
|
@ -4278,13 +4278,12 @@ public:
|
|||||||
|
|
||||||
void sleepForSecs(_Float sec){
|
void sleepForSecs(_Float sec){
|
||||||
_Int ms = (_Int)(sec * 1000);
|
_Int ms = (_Int)(sec * 1000);
|
||||||
const _Int step = 20;
|
for(_Int i=0; i<ms; i+=20){
|
||||||
for(_Int i=0; i<ms; i+=step){
|
|
||||||
_checkStopFlag();
|
_checkStopFlag();
|
||||||
#ifdef __EMSCRIPTEN__
|
#ifdef __EMSCRIPTEN__
|
||||||
emscripten_sleep(step);
|
emscripten_sleep(20);
|
||||||
#else
|
#else
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(step));
|
std::this_thread::sleep_for(std::chrono::milliseconds(20));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5026,7 +5025,14 @@ public:
|
|||||||
void suspend(){
|
void suspend(){
|
||||||
if(_state != THREAD_RUNNING) UNREACHABLE();
|
if(_state != THREAD_RUNNING) UNREACHABLE();
|
||||||
_state = THREAD_SUSPENDED;
|
_state = THREAD_SUSPENDED;
|
||||||
while(_state == THREAD_SUSPENDED) _checkStopFlag();
|
while(_state == THREAD_SUSPENDED){
|
||||||
|
_checkStopFlag();
|
||||||
|
#ifdef __EMSCRIPTEN__
|
||||||
|
emscripten_sleep(20);
|
||||||
|
#else
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(20));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_Str readJsonRpcRequest(){
|
_Str readJsonRpcRequest(){
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit ac067d7f1f84cb757db20ffb3c929d880053c6c1
|
Subproject commit ed849abe8ed709eb7e378d39f4b8709e4ff9667f
|
16
src/vm.h
16
src/vm.h
@ -378,13 +378,12 @@ public:
|
|||||||
|
|
||||||
void sleepForSecs(_Float sec){
|
void sleepForSecs(_Float sec){
|
||||||
_Int ms = (_Int)(sec * 1000);
|
_Int ms = (_Int)(sec * 1000);
|
||||||
const _Int step = 20;
|
for(_Int i=0; i<ms; i+=20){
|
||||||
for(_Int i=0; i<ms; i+=step){
|
|
||||||
_checkStopFlag();
|
_checkStopFlag();
|
||||||
#ifdef __EMSCRIPTEN__
|
#ifdef __EMSCRIPTEN__
|
||||||
emscripten_sleep(step);
|
emscripten_sleep(20);
|
||||||
#else
|
#else
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(step));
|
std::this_thread::sleep_for(std::chrono::milliseconds(20));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1126,7 +1125,14 @@ public:
|
|||||||
void suspend(){
|
void suspend(){
|
||||||
if(_state != THREAD_RUNNING) UNREACHABLE();
|
if(_state != THREAD_RUNNING) UNREACHABLE();
|
||||||
_state = THREAD_SUSPENDED;
|
_state = THREAD_SUSPENDED;
|
||||||
while(_state == THREAD_SUSPENDED) _checkStopFlag();
|
while(_state == THREAD_SUSPENDED){
|
||||||
|
_checkStopFlag();
|
||||||
|
#ifdef __EMSCRIPTEN__
|
||||||
|
emscripten_sleep(20);
|
||||||
|
#else
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(20));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_Str readJsonRpcRequest(){
|
_Str readJsonRpcRequest(){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user