Struct spdlog::ThreadPool
source · pub struct ThreadPool { /* private fields */ }
Available on crate feature
multi-thread
only.Expand description
A thread pool for processing operations asynchronously.
Currently only used in AsyncPoolSink
.
§Examples
use spdlog::{sink::AsyncPoolSink, ThreadPool};
let thread_pool: Arc<ThreadPool> = Arc::new(ThreadPool::new()?);
let async_pool_sink: AsyncPoolSink = AsyncPoolSink::builder()
.sink(underlying_sink)
.thread_pool(thread_pool)
.build()?;
Implementations§
source§impl ThreadPool
impl ThreadPool
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ThreadPool
impl Send for ThreadPool
impl Sync for ThreadPool
impl Unpin for ThreadPool
impl !UnwindSafe for ThreadPool
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more