mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-25 12:04:21 +01:00
core/storage: Mark Page as Send and Sync
This commit is contained in:
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user