haskell-libui
haskell-libui copied to clipboard
Some examples run at 100% CPU usage
E.g. libui-simple-counter-example
, 100% CPU in htop
In strace
it's busy-looping around poll (because poll()
is given a 0-timeout):
[pid 31736] recvmsg(11, 0x7ffe9da1db20, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 31736] poll([{fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}], 3, 0) = 0 (Timeout)
[pid 31736] recvmsg(11, 0x7ffe9da1db20, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 31736] poll([{fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}], 3, 0) = 0 (Timeout)
Not sure if it's an issue with libui or haskell-libuil, or the example code calling the functions wrong.