You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: lib.rs
    path of file: ./repos/lnx/lnx-engine/aexecutor/src
    
    the code of the file until where you have to start completion: mod reader_executor;

use std::borrow::Borrow;

use anyhow::{Error, Result};
use tantivy::{LeasedItem, Searcher};
use tokio::sync::{oneshot, Semaphore};

use crate::reader_executor::TantivyExecutorPool;

/// A thread pool that waits for a given task to complete
/// before resolving the future.
///
/// This is mo
    
    pub async fn create(max_concurrency: usize) -> Result<Self> {
        let limiter = Semaphore::new(max_concurrency);
        let thread_pool = rayon::ThreadPoolBuilder::new()
            .thread_name(|n| format!("executor-pool-worker-{}", n))
            .num_threads(max_concurrency)
            .build()?;

        Ok(Self {
            limiter,
            thread_pool,
        })
    }