So ive noticed rust has “multiple producer producer single consumer”. But what about “multiple consumer single producer”?
Or how would I send a task to a channel and have 1 of the threads pick it up?
I was thinking of having like 4 threads (or tied to how many cores you have) and they just pick some work up of the queue, if they’re all busy then the queue just fills up until one of them can do it.
Would like to see a simple implementation that isn’t just using threadpool, as I’ve been struggling with coming up with a working example.