Thread stack size
-
Hi,
I'm quite new to the wipy, and I was experimenting today with threads. My question is about the threads stack size.
Using _thread.stack_size([size]) doesn't seem to have any effect while creating the threads, as indepently from specifyed size, I never run into an error.
The problem comes when I have more than three active threads, every time I start the fourth thread, I run into this error:
MemoryError: memory allocation failed, allocating 6144 bytes
Is it possible to run more than three simultanious threads? Am I specifying the stack size wrongly?Thanks.
-
@toribios_people Welcome to the forum!
Let us have a look at this problem and I'll get back to you shortly. Thanks.
-
@daniel I have seen that you fixed this problem on 1.2.2.b1, but anything below 4096 for the stack size, seems to be ignored. Is this the minimum stack size? Even if the task of the tread is very simple? Thanks.
-
@toribios_people Yes, 4096 is the minimum settable stack size.
https://docs.pycom.io/pycom_esp32/library/thread.html
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login