d-unsed / ruru

Native Ruby extensions written in Rust
MIT License
832 stars 40 forks source link

Fix possible segfault issue when using threads #68

Closed jwilm closed 7 years ago

jwilm commented 7 years ago

This adds 'static bounds to the closures passed into thread creation methods. The 'static bound is necessary to prevent non-moving closures from being used. As evident from #64, it was possible to violate Rust's ownership model without the 'static bounds.

Resolves #64.

d-unsed commented 7 years ago

Thank you @jwilm