urequests and _thread: (Pico W) issue #16636
Unanswered
flori8029
asked this question in
RP2040 / Pico
Replies: 1 comment 3 replies
-
_thread is highly experimental and best avoided. Maybe try a timer for recurring tasks. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear users,
currently, I'm developing a program that uses both urequests and _thread on my Pico W with micropython (v1.24.1). Everything works fine until I uncomment the line
_thread.start_new_thread(blinken, ())
which should start a function on the other core that does nothing but printing "Hello" periodically.When I uncomment the mentioned line and restart the program the following error occurs (already in the first iteration of the while-True-Loop that contains the request):
I should mention that the
urequest.get()
needs about 10 seconds to get its data from the server (that's normal because the server needs some time to assemble this data; the received size of the received data doesn't cause any memory overflow).I already did some research and tried using the timeout option in
get
, but that didn't work. The network connection is stable. I couldn't find out any reasons for that behavior. That's why I would be glad if you could assist me solving this issue.Yours sincerely,
flori8029
Beta Was this translation helpful? Give feedback.
All reactions