Can reuse a Thread for interaction multiple times?

I have a connection whit a tcp::stream and stay interaction sending data(take of a vector) whit a host, but in a moment the host close the connection, so can i send the rest of the vector like a return and then reassing to a new host and continue the iter in the vector?

I am thinking about save the threads into a vector and next do join into a iter, then the threads can reuse him self?

or i need to create a new thread for every new connection?
I don't know if is clear the idea?

I am noob in rust, thanks for all the help!

You can reuse threads, but totally not the way you plan to. You can't reuse them from the JoinHandle side.

This is usually solved by implementing a thread pool.

You create "non-reusable" threads that contain an infinite loop in which they read messages from a channel (like crossbeam-channel), and execute work according to the message they've received.

You can also use rayon which already implements such threadpool.

Or use tokio if you mostly need to do network I/O.