Document why Send and Sync are safe.

This commit is contained in:
Nick Lewycky
2020-11-02 13:22:19 -08:00
parent 22187a8dc4
commit 1a1bcbc21b

View File

@@ -72,10 +72,12 @@ impl std::ops::Deref for FunctionBodyPtr {
}
/// # Safety
/// TODO:
/// The VMFunctionBody that this points to is opaque, so there's no data to
/// read or write through this pointer. This is essentially a usize.
unsafe impl Send for FunctionBodyPtr {}
/// # Safety
/// TODO:
/// The VMFunctionBody that this points to is opaque, so there's no data to
/// read or write through this pointer. This is essentially a usize.
unsafe impl Sync for FunctionBodyPtr {}
/// Pointers to section data.