noib3/nvim-oxi

Unsafety when calling functions from other threads

Closed this issue · 1 comments

unwrap_unchecked is used in with_state https://github.com/noib3/nvim-oxi/blob/master/crates/luajit-bindings/src/state.rs#L21. with_state is used in a bunch of safe functions such as schedule. So isn't it unsafe to call functions like schedule from other threads? I think the normal unwrap should be used here. The same thing happens in libuv-bindings

noib3 commented

thanks for the catch, fixed by 8729216