MicroPython on ESP32 with SPIRAM support

apluess
Posts: 1
Joined: Thu Apr 12, 2018 6:42 am

Re: MicroPython on ESP32 with SPIRAM support

Postby apluess » Thu Apr 12, 2018 7:38 am

Thank you for the awesome SPIRAM contribution. I like also the thread support that is needed for many of my projects. Here my question:

I create a new thread that runs in an endless while loop like

while isRunning:
---
I would like to stop this thread when I press ^C in the main REPL thread (without catching the Keyboard Interrupt exception explicitely). How can my thread know, if the REPL thread got a ^C and stop gently?

I tried the _thread.status() or _thread.list(). But the MainThread is still in state: running, even when I pressed ^C.

Thanks.
Aegidius

User avatar
loboris
Posts: 423
Joined: Wed Dec 21, 2016 7:40 pm

Re: MicroPython on ESP32 with SPIRAM support

Postby loboris » Thu Apr 12, 2018 6:42 pm

There are many ways to comunicate with a thread and to end it. I would recommend to study the threads Wiki page and thread example.

A better place to discuss questions like this may be this forum.

Who is online

Users browsing this forum: No registered users and 4 guests