use std::cell::{Cell, RefCell};
use crate::pool::BufferEntry;
pub(crate) struct TlsCache {
pub buffers: Vec<BufferEntry>,
}
impl TlsCache {
pub const fn new() -> Self {
Self { buffers: Vec::new() }
}
}
thread_local! {
pub(crate) static TLS_CACHE: RefCell<TlsCache> = const { RefCell::new(TlsCache::new()) };
pub(crate) static TLS_LIMIT: Cell<usize> = const { Cell::new(0) };
pub(crate) static SHARD_AFFINITY: Cell<Option<usize>> = const { Cell::new(None) };
}