Pompey21 / Client-Server-Rust-2

A simple client-server application but I start from scratch!
0 stars 0 forks source link

Making is Async ++ Global Variable Access in Different THreads #17

Closed Pompey21 closed 1 year ago

Pompey21 commented 1 year ago

When I tried to modify my handles() method to be able to modify the global variable I had to pass in the new argument - the borrow of the global variable. However, this triggered some weird "variable can be outlived by the borrow" error and this is how it was explained.

Screenshot 2023-05-04 at 11 58 29

Not sure if the 'move' is a good fix as I am doing it for the first time.