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 Yes, 4096 is the minimum settable stack size.
https://docs.pycom.io/pycom_esp32/library/thread.html
-
@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 Welcome to the forum!
Let us have a look at this problem and I'll get back to you shortly. Thanks.