Manuel Tobias Schiller wrote:
> I tried to experiment further by adding an idle thread with minimal  
> priority to the application which simply usleeps 50 ms (blocking all  
> other threads as well); this approach made the cpu usage drop to about  
> 35% to 45%, but this is still way above what can be done with blocking  
> I/O.

If it's acceptable to block all other threads, wouldn't it be more
appropriate to use poll() or select() with a 50 ms timeout instead
of usleep()? Albeit you probably want a higher timeout to prevent
that the process gets unnecessarily scheduled.

-- 
Christian

Attachment: pgpDiLkmH0zj9.pgp
Description: PGP signature

Reply via email to