memkit-async 0.2.0-beta.1

Async-aware memory allocators for memkit
//! # memkit-async
//!
//! Async-aware memory allocators for memkit.
//!
//! ## Features
//!
//! - **Task-local allocators**: Each async task gets its own allocation context
//! - **Backpressure-aware pools**: Configurable behavior when pools are exhausted
//! - **Zero-copy channels**: Transfer ownership between tasks without copying
//! - **Safe across .await**: Allocations tracked per-task, not per-thread
//!
//! ## Example
//!
//! ```rust,ignore
//! use memkit_async::{MkAsyncFrameAlloc, MkAsyncPool, MkBackpressure};
//!
//! async fn process_data() {
//!     let alloc = MkAsyncFrameAlloc::new(Default::default());
//!     
//!     let frame = alloc.begin_frame().await;
//!     let data = alloc.alloc::<[f32; 1024]>().await;
//!     // ... process data ...
//!     drop(frame); // End frame
//! }
//! ```

pub mod allocator;
pub mod backpressure;
pub mod channel;
pub mod pool;
pub mod task_local;
pub mod sync;
pub mod container;
pub mod runtime;

// Re-exports
pub use allocator::{MkAsyncFrameAlloc, MkAsyncFrameGuard};
pub use backpressure::MkBackpressure;
pub use channel::{MkAsyncChannel, MkAsyncSender, MkAsyncReceiver};
pub use pool::{MkAsyncPool, MkPoolGuard};
pub use task_local::MkTaskLocal;
pub use sync::{MkAsyncBarrier, MkAsyncSemaphore};
pub use container::{MkAsyncBox, MkAsyncVec};

#[cfg(feature = "tokio")]
pub use runtime::{with_allocator, current_allocator, try_current_allocator, mk_spawn};