core/storage: Mark Page as Send and Sync

This commit is contained in:
Pekka Enberg
2025-09-27 15:14:47 +03:00
parent 9cd869f660
commit ce76aa11b2

View File

@@ -168,6 +168,11 @@ pub struct Page {
pub inner: UnsafeCell<PageInner>,
}
// SAFETY: Page is thread-safe because we use atomic page flags to serialize
// concurrent modifications.
unsafe impl Send for Page {}
unsafe impl Sync for Page {}
// Concurrency control of pages will be handled by the pager, we won't wrap Page with RwLock
// because that is bad bad.
pub type PageRef = Arc<Page>;