unixbar
unixbar copied to clipboard
Alsa plugin consuming 100% CPU in error state
If PulseAudio crashes (like it did for me earlier this week) the alsa plugin goes into an busy loop and consumes 100% CPU of one core.
https://github.com/myfreeweb/unixbar/blob/dba1475cce15c4d75abe8bde0bb11a98fbcfea6f/src/widget/volume/alsa.rs#L76-L82
I haven't had a chance to reproduce it yet but I suspect the issue is that the fd becomes invalid so poll returns an error immediately and the loop repeats rapidly.