arduino / ArduinoCore-mbed

347 stars 202 forks source link

MbedClient.cpp - invalid osPriority? and thread name #996

Open megacct opened 2 weeks ago

megacct commented 2 weeks ago

reader_th = new rtos::Thread(osPriorityNormal - 2); This appears to always give priority normal, which is good as any other priority seems to cause a hang. It would also be nice to have the thread named. If changed to: reader_th = new rtos::Thread(osPriorityNormal - 2, OS_STACK_SIZE, nullptr, "readSocket"); then a compile error is returned for the priority. I would suggest this should be changed to: reader_th = new rtos::Thread(osPriorityNormal, OS_STACK_SIZE, nullptr, "readSocket");