mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/code] Remove interruption check
A check for interruption in ConsoleController::printText caused script to immediately stop when launched after an interrupted script. This check was used to break out of infinite print loop, but now becomes redundant with how micropython_port_vm_hook_loop was changed. Change-Id: Ifa8d415e1b2c2406ad67300eb14ce46889af296f
This commit is contained in:
committed by
LeaNumworks
parent
7dcf1662b0
commit
b7c7695707
@@ -450,26 +450,6 @@ void ConsoleController::printText(const char * text, size_t length) {
|
||||
flushOutputAccumulationBufferToStore();
|
||||
micropython_port_vm_hook_refresh_print();
|
||||
}
|
||||
#if __EMSCRIPTEN__
|
||||
/* If we called micropython_port_interrupt_if_needed here, we would need to
|
||||
* put in the WHITELIST all the methods that call
|
||||
* ConsoleController::printText, which means all the MicroPython methods that
|
||||
* call print... This is a lot of work + might reduce the performance as
|
||||
* emterpreted code is slower.
|
||||
*
|
||||
* We thus do not allow print interruption on the web simulator. It would be
|
||||
* better to allow it, but the biggest problem was on the device anyways
|
||||
* -> It is much quicker to interrupt Python on the web simulator than on the
|
||||
* device.
|
||||
*
|
||||
* TODO: Allow print interrpution on emscripten -> maybe by using WASM=1 ? */
|
||||
#else
|
||||
/* micropython_port_vm_hook_loop is not enough to detect user interruptions,
|
||||
* because it calls micropython_port_interrupt_if_needed every 20000
|
||||
* operations, and a print operation is quite long. We thus explicitely call
|
||||
* micropython_port_interrupt_if_needed here. */
|
||||
micropython_port_interrupt_if_needed();
|
||||
#endif
|
||||
}
|
||||
|
||||
void ConsoleController::autoImportScript(Script script, bool force) {
|
||||
|
||||
Reference in New Issue
Block a user