make FixedIndexReader Send and update comments

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2019-02-28 09:36:19 +01:00
parent fded74d0c7
commit 5be4065baf
2 changed files with 5 additions and 1 deletions

View File

@ -36,7 +36,8 @@ pub struct DynamicIndexReader {
pub ctime: u64,
}
// fixme: ???!!!
// `index` is mmap()ed which cannot be thread-local so should be sendable
// FIXME: Introduce an mmap wrapper type for this?
unsafe impl Send for DynamicIndexReader {}
impl Drop for DynamicIndexReader {

View File

@ -36,6 +36,9 @@ pub struct FixedIndexReader {
pub ctime: u64,
}
// `index` is mmap()ed which cannot be thread-local so should be sendable
unsafe impl Send for FixedIndexReader {}
impl Drop for FixedIndexReader {
fn drop(&mut self) {