-- Leo's gemini proxy

-- Connecting to freeshell.de:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-GB

Tiny thread issues 🧵

To make sounds on the Thumby while something else is happening you need threads. In a sane world, spawn all the threads you want, and the machine does its best to allocate processing time to them using whatever cores it has and/or time sharing. Not on Thumby. There are two cores, and that means two threads max. I've been playing tunes by starting a new thread every time, and it's worked. Each thread ends before it's time for another tune to play. Except when it doesn't. Sometimes a tune thread hangs around. Then when it's time for another tune, that's a third thread and "OSError: core1 in use" and it crashes.


The upshot of all this is I need one music thread that's always running, and I need to grok some Python stuff about sharing and/or passing data between threads. I'm not happy because it was all working fine. Or so I thought.


Grumble, grumble...


#programming

#Thumby


gemlog


-- Response ended

-- Page fetched on Fri May 3 21:52:37 2024