Rust threads operate just like in any other language—in scopes. Any other scope (such as closures) can easily borrow the variables from the parent scope since it's easy to determine if and when variables are dropped. However, when spawning a thread, its lifetime, compared to its parent's lifetime, is impossible to know and therefore the reference can become invalid at any time.
To tackle this problem, the threaded scope can take ownership of its variables—the memory is moved into the thread's scope. Let's see how this is done!