Skip to content

Commit

Permalink
SmolBlockingBlockingThreadPool
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Sep 10, 2024
1 parent a92d8ff commit 7b7408c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crates/voicevox_core/src/asyncs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ impl Async for Unstoppable {
/// [blocking]クレートで駆動する。
///
/// [blocking](https://docs.rs/crate/blocking)
pub(crate) enum SmolBlocking {}
pub(crate) enum BlockingThreadPool {}

impl Async for SmolBlocking {
impl Async for BlockingThreadPool {
async fn open_file(path: impl AsRef<Path>) -> io::Result<impl AsyncRead + AsyncSeek + Unpin> {
async_fs::File::open(path).await
}
Expand Down
6 changes: 3 additions & 3 deletions crates/voicevox_core/src/voice_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,16 +439,16 @@ pub(crate) mod tokio {
use std::path::Path;

use crate::{
asyncs::SmolBlocking, error::LoadModelResult, infer::domains::InferenceDomainMap, Result,
VoiceModelMeta,
asyncs::BlockingThreadPool, error::LoadModelResult, infer::domains::InferenceDomainMap,
Result, VoiceModelMeta,
};

use super::{Inner, ModelBytesWithInnerVoiceIdsByDomain, VoiceModelHeader, VoiceModelId};

/// 音声モデル。
///
/// VVMファイルと対応する。
pub struct VoiceModel(Inner<SmolBlocking>);
pub struct VoiceModel(Inner<BlockingThreadPool>);

impl self::VoiceModel {
pub(crate) async fn read_inference_models(
Expand Down

0 comments on commit 7b7408c

Please sign in to comment.