245
I love Rust
(lemmy.blahaj.zone)
Post funny things about programming here! (Or just rant about your favourite programming language.)
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: