I have tested the system a little bit more. sem_timed_wait is busy waiting. I cant move the mouse while aplication is running. Therefor I cant use it. So please reply the first mail. Anders Gnistrup.