clap_sys/ext/
thread_pool.rs

1use crate::{cstr, host::*, plugin::*};
2
3use std::ffi::CStr;
4
5pub const CLAP_EXT_THREAD_POOL: &CStr = cstr!("clap.thread-pool");
6
7#[repr(C)]
8#[derive(Debug, Copy, Clone)]
9pub struct clap_plugin_thread_pool {
10    pub exec: Option<unsafe extern "C" fn(plugin: *const clap_plugin, task_index: u32)>,
11}
12
13#[repr(C)]
14#[derive(Debug, Copy, Clone)]
15pub struct clap_host_thread_pool {
16    pub request_exec: Option<unsafe extern "C" fn(host: *const clap_host, num_tasks: u32) -> bool>,
17}