this post was submitted on 15 Nov 2024
192 points (93.2% liked)
Programmer Humor
32472 readers
480 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
The bingo one actually uses crossbeam channels instead of mutexes, so that's nice. I haven't looked too closely at it though.
I don't think you can do too much about the Spectrum one if you want to keep the two threads, but here's what I would change related to thread synchronization. Lemmy doesn't seem to allow me to attach patch files for whatever reason so have an archive instead... https://dblsaiko.net/pub/tmp/patches.tar.bz2 (I wrote a few notes in the commit messages)
So basically it's channels indexed by channel number and name? That one is actually one of the easy cases. Store indices instead: