aboutsummaryrefslogtreecommitdiff
path: root/scripts/benchmark.py
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-07-13 11:27:23 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-07-13 11:27:23 +0000
commit09bdf20aa0a6e29265e5e7b81b941a2b894be3db (patch)
tree6d0389034108d4f57d798b7f951ce04f78b10a61 /scripts/benchmark.py
parentMerge branch 'renderer-dont-special-case-cursor-cell' (diff)
render: keep lock while pushing dirty rows to worker queue
Instead of locking the queue for each dirty row we append, and signaling a condition variable, just keep the lock while going through the visible rows. Release the lock once done. Since we take the lock *before* posting the 'start' semaphore, all workers will be waiting for the lock to be released. Then, one at a time they'll get the lock and pick a row to render. The queue will never get empty - when all rows have been rendered, each worker will pick a 'frame done' "job" from the queue, and break the rendering loop.
Diffstat (limited to 'scripts/benchmark.py')
0 files changed, 0 insertions, 0 deletions