summaryrefslogtreecommitdiff
path: root/examples/make-ggml.py
diff options
context:
space:
mode:
authorJustine Tunney <jtunney@gmail.com>2023-12-29 06:24:12 -0800
committerGitHub <noreply@github.com>2023-12-29 16:24:12 +0200
commitdb49ff8ed7f0bb201176703441cc02911b08ef2a (patch)
treea872e058513f73931d582a3fba20bac012520ad9 /examples/make-ggml.py
parent60f55e888c29cbd87c4238dd19e85d0eef87245d (diff)
server : replace sleep with condition variables (#4673)
The server currently schedules tasks using a sleep(5ms) busy loop. This adds unnecessary latency since most sleep implementations do a round up to the system scheduling quantum (usually 10ms). Other libc sleep impls spin for smaller time intervals which results in the server's busy loop consuming all available cpu. Having the explicit notify() / wait() code also helps aid in the readability of the server code. See mozilla-Ocho/llamafile@711344b
Diffstat (limited to 'examples/make-ggml.py')
0 files changed, 0 insertions, 0 deletions