this post was submitted on 15 Nov 2024
195 points (93.3% liked)
Programmer Humor
32469 readers
632 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: