Skip to main content

ass_editor/core/thread_safety/
mod.rs

1//! Thread safety abstractions for the editor
2//!
3//! Provides thread-safe wrappers and synchronization primitives for
4//! multi-threaded editor usage, ensuring safe concurrent access to
5//! document state and operations.
6
7// Allow Arc with non-Send/Sync types because we're providing
8// thread safety through RwLock synchronization
9#![allow(clippy::arc_with_non_send_sync)]
10
11#[cfg(all(feature = "concurrency", feature = "async"))]
12mod async_document;
13#[cfg(feature = "concurrency")]
14mod document_pool;
15#[cfg(feature = "concurrency")]
16mod scoped_lock;
17#[cfg(feature = "concurrency")]
18mod sync_document;
19
20#[cfg(test)]
21#[cfg(feature = "concurrency")]
22mod tests;
23
24#[cfg(all(feature = "concurrency", feature = "async"))]
25pub use async_document::AsyncDocument;
26#[cfg(feature = "concurrency")]
27pub use document_pool::DocumentPool;
28#[cfg(feature = "concurrency")]
29pub use scoped_lock::ScopedDocumentLock;
30#[cfg(feature = "concurrency")]
31pub use sync_document::SyncDocument;