pub(super) struct FontQueue {
pub pending: Vec<(String, String, bool, u8, bool)>,
pub seen: BTreeSet<String>,
pub active_workers: usize,
}Expand description
取得待ちのフォント URL。
Fields§
§pending: Vec<(String, String, bool, u8, bool)>(host, path, is_https, 優先度, まとめ取得を諦めた印)。
5 番目は「一度まとめ取得で失敗したので次は個別に取る」印。 これが無いと、失敗 → 積み直し → また同じ便にまとめられる → また失敗、の堂々巡りになる(実測でページが読めなくなった)。
seen: BTreeSet<String>取得済み・取得中の URL(重複投入を防ぐ)。R-4。
active_workers: usize【2026-08-04】稼働中のワーカースレッド数。
以前は thread_active: bool でワーカーが 1 本だけだった。
5.3MB の Noto Sans JP を 1 本取っている間、同じキューの後続は
一切進まない。実測でギャラリー画像がフォント 21MB の後ろに
並んで実行時間内に届かなかった。
通信待ちの間はスケジューラへ譲るので、複数本走らせれば 重いリソースが他をブロックしなくなる。
Auto Trait Implementations§
impl Freeze for FontQueue
impl RefUnwindSafe for FontQueue
impl Send for FontQueue
impl Sync for FontQueue
impl Unpin for FontQueue
impl UnsafeUnpin for FontQueue
impl UnwindSafe for FontQueue
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