ftrias / TeensyThreads

MIT License
184 stars 26 forks source link

setPriority Ticks Ignored #10

Closed flybrianfly closed 3 years ago

flybrianfly commented 6 years ago

The void setPriority(int id, int ticks) method ignores the int ticks input. Within the method, ticks becomes level and is stored as threadp[id]->priority. However, in getNextThread(), threadp[id]->priority is reset to the default value of 0 immediately on setting the priority thread as the current thread.

I don't need this feature, but I stumbled across this bug and wanted to bring your attention to it in case there are any unintended consequences.