I am about to write an article about using
std::sync::mpsc with multiple threads of execution to solve a computation-heavy cryptographic puzzle (in fact it’s a very basic implementation of the idea behind the problem of “mining” cryptocurrencies). I have already prepared the code!
Here’s the repository. Please note, that I’m trying to keep it as simple as possible, so that readers will easily grasp the idea of communication between worker threads and the main thread (in
std::sync::mpsc's fashion). I picked that particular cryptographic puzzle, because it’s relatively easy to understand, it has real life applications (see: cryptocurrencies) and should be ease to experiment with (by manipulating the value of one constant in the source code).
Thanks, in advance, for valuable comments!