Closed Woah0420 closed 2 months ago
I assume you'd also asked the same question at Discord and got a quicker answer? Since you closed I assume that answer resolved your issue?
Is this a decent enough way to resolve this issue, or would you prefer me to add a duplicate() method on the Vmm struct? That way it would be simplified a bit further and you'd be able to pass on the ownership of the newly created Vmm object to your other thread? Or is the current way of doing things decent enough?
because of the static lifetime of the Vmm structure I cannot pass it to threads so they can create their own scatter handles. is there any way to stop this error?
I know I spelled entities wrong
fpga
does not live long enough --> src\main.rs:55:28fpga
declared here 55fpga
is borrowed for'static
... 113 | } | -
fpga
dropped here while still borrowedfn entity_cache_loop(scatter_handle: &Arc, base: u64, entity_list: u64, cached_player_list: Arc<Mutex<Vec>>) {
}
fn entity_loop(cached_player_list: Vec, cached_item_list: Vec) -> Result<u8, anyhow::Error> {
}
fn main() { let cached_player_list = Vec::::new();
let cached_item_list = Vec::::new();