fix thread managment for sdl2 with priorities