Hello, everyone!
Upon completing Chapter 20 of the Rust book successfully, I decided I would continue expanding and building upon the newly-created web server to fit my own needs.
As such, my first goal was to refactor existing code into separate modules (and files) for future proofing. In doing so, however, I managed to get the following error, which I am unable to fix.
error[E0277]: `std::sync::mpsc::Sender<net::jobs::threading::Message>` cannot be shared between threads safely
--> src/net.rs:68:30
|
68 | self.worker_pool.execute(move || {
| ^^^^^^^ `std::sync::mpsc::Sender<net::jobs::threading::Message>` cannot be shared between threads safely
|
Full error (I am aware of the 2nd error thrown, but I can easily fix that):
Gist
Please see the gists of the files below (put into one gist due to new forum users limited to 2 links / post):
Links gist
Can you please point me in a direction as to what I'm doing wrong? It seems to me that all I've done is move code around in files, however, I obviously broke something somewhere.
I appreciate your time!