mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
The SharedSingleProducerCircularQueue used here has dubious value, This queue is used to pass commands to the audio thread, such as play/pause/ seek/volume change/etc. We can make do with a simple locked vector, as we were blocking to enqueue tasks anyways. We can also use an atomic bool to tell the audio thread when it needs to take a lock on the task queue, to keep the thread lock-free most of the time.