libffi-rs
libffi-rs copied to clipboard
Make FnPtrN: !Sync + !Send
This is intended to fix a soundness bug, the first item in #34, namely:
It erases all auto trait information attached to closure captures (read:
SendandSync)
The simplest fix is to make FnPtrN !Send and !Sync. This means we generally cannot pass our closures between threads, which may not be a satisfactory solution. An alternative PR I am working on will attempt to thread the auto traits from the original Rust closure through the Closure…N to the FnPtrN.