Implement Send + Sync for WhisperVadContext
All data stored internally on this struct appears to be similar to what's stored on WhisperContext so this should also be threadsafe.
This commit is contained in:
parent
d966ab1602
commit
8bf0602e24
1 changed files with 2 additions and 0 deletions
|
|
@ -141,6 +141,8 @@ impl WhisperVadContextParams {
|
|||
pub struct WhisperVadContext {
|
||||
ptr: *mut whisper_vad_context,
|
||||
}
|
||||
unsafe impl Send for WhisperVadContext {}
|
||||
unsafe impl Sync for WhisperVadContext {}
|
||||
|
||||
impl WhisperVadContext {
|
||||
pub fn new(model_path: &str, params: WhisperVadContextParams) -> Result<Self, WhisperError> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue