Here you see what happens:
I have 4 Teensy_Reboot runnning occupying the 4 cores of my CPU completely (each 25%).
How to reproduce ?
Run a sketch that uses USB Type = "Serial".
A COM port appears on your PC.
Open this COM port in a Terminal program (example TeraTerm)
In the Arduino Compiler click "Upload"
The sketch cannot be uploaded because the COM port is already open.
(It happens to me frequently that I forget to close the COM port before uploading)
The TeensyLoader is waiting but it does not upload the sketch.
I close the TeensyLoader quickly, close the COM port and click "Upload" in the Compiler again.
Now the sketch is uploaded but the previous teensy_reboot keeps running in the background.
Doing this procedure 4 times my PC becomes so slow that I cannot even open Taskmanager anymore because all 4 cores runn with 25% each.
Teensy_Reboot should have a timeout (15 seconds) after which it gives up when it has no success.
And it should not have any loops without a Sleep() inside.
You should never program an endless loop without making small pauses.
In C++ a Sleep(50) in any loop is enough to avoid that your process will ever occupy 100% of a CPU core.
I have 4 Teensy_Reboot runnning occupying the 4 cores of my CPU completely (each 25%).
How to reproduce ?
Run a sketch that uses USB Type = "Serial".
A COM port appears on your PC.
Open this COM port in a Terminal program (example TeraTerm)
In the Arduino Compiler click "Upload"
The sketch cannot be uploaded because the COM port is already open.
(It happens to me frequently that I forget to close the COM port before uploading)
The TeensyLoader is waiting but it does not upload the sketch.
I close the TeensyLoader quickly, close the COM port and click "Upload" in the Compiler again.
Now the sketch is uploaded but the previous teensy_reboot keeps running in the background.
Doing this procedure 4 times my PC becomes so slow that I cannot even open Taskmanager anymore because all 4 cores runn with 25% each.
Teensy_Reboot should have a timeout (15 seconds) after which it gives up when it has no success.
And it should not have any loops without a Sleep() inside.
You should never program an endless loop without making small pauses.
In C++ a Sleep(50) in any loop is enough to avoid that your process will ever occupy 100% of a CPU core.