aboutsummaryrefslogtreecommitdiff
path: root/pgo
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-11-23 18:26:00 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-11-23 18:26:00 +0000
commit90edc096971aa013dbacf1315271c2f2da62bd59 (patch)
tree75d592ca2c4797188d5d6f34790e535085c964a6 /pgo
parentsixel: fix crash when an explicit sixel size had a height less than 6 pixels (diff)
render: don’t call term_arm_blink_timer() from multiple threads
We call term_arm_blink_timer() from render_cell(), which runs in multiple threads. This caused multiple blink timer FDs to be created and registered with the FDM, later causing read failures after one of those FDs had been closed again. This rarely happened under normal circumstances, but was easy to trigger when the whole screen was full of blinking text. As a small optimization, we don’t bother taking the lock if the timer FD already is valid. This is safe, because: 1) If the timer FD isn’t valid, we take the lock and then call term_arm_blink_timer(), which again checks if the FD is already valid. 2) The blink timer FD cannot be closed while we’re rendering cells. It is only disabled in the FDM callback, which cannot execute while we’re rendering.
Diffstat (limited to 'pgo')
0 files changed, 0 insertions, 0 deletions