aboutsummaryrefslogtreecommitdiff
path: root/scripts/generate-alt-random-writes.py
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-01-04 20:10:08 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-01-04 20:10:08 +0000
commitabc36d8f090dbae1b127f74a83b601d3fa3c8bed (patch)
tree91a082035cd29ab4755c12b6726327df278bd5a0 /scripts/generate-alt-random-writes.py
parentrender: remove debug logging (diff)
wayland: wl_display_flush() never blocks
Since it doesn't block, we need to detect EAGAIN failures and ensure we actually flush everything. If we don't, we sooner or later end up in a wayland client library call that aborts due to the socket buffer being full. Ideally, we'd simply enable POLLOUT in the FDM. However, we cannot write *anything* to the wayland socket until we've actually managed to send everything. This means enabling POLLOUT in the FDM wont work since we may (*will*) end up trying to write more data to it before we've flushed it. So, add a wrapper function, wayl_flush(), that acts as a blocking variant of wl_display_flush(), by detecting EAGAIN failiures and calling poll() itself, on the wayland socket only, until all data has been sent.
Diffstat (limited to 'scripts/generate-alt-random-writes.py')
0 files changed, 0 insertions, 0 deletions