When using a ThreadPool passing Arc with reference gives a "data escapes the function body" error, passing Arc of data itself works fine
I’ve written some code to break up independent chunks of a computation into pieces and then feed each of the pieces to a thread pool which then does the computation and passes the result back the main thread via a mpsc. The code is as follows: pub fn impute(pbwt_data : Arc<&pbwt::PbwtInfo>, test_sequences : Vec<Vec<u8>>) ->… Read More When using a ThreadPool passing Arc with reference gives a "data escapes the function body" error, passing Arc of data itself works fine