unixbar icon indicating copy to clipboard operation
unixbar copied to clipboard

Alsa plugin consuming 100% CPU in error state

Open wezm opened this issue 5 years ago • 1 comments

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.

wezm avatar Oct 15 '20 23:10 wezm