[Dispatcher] replace deprecated pthread_yield with sched_yield
Compilation with gcc on ubuntu 21.10 fails because pthread_yield is apparently deprecated and should be replaced with sched_yield.
gcc --version
gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0
Edited by Maxim Onciul