pub struct ClosedRing {
slots: [AtomicU64; 32],
next: AtomicUsize,
}Expand description
捨てた JS の実行環境の番号の控え(2026-11-18、TODO R2 (d) ③)。
タブを閉じた・止めた・ページを移ったとき、その実行環境(JsRuntime::runtime_id)が積んだ要求と届いた結果を捨てる。
待ち行列の錠が取れなかったとき(try_lock)や、ワーカーが取り出した直後と行き違ったときのために、
最近捨てた番号をここに覚えておき、ワーカーは取り出した要求・取り終えた結果をこれで確かめて捨てる。
錠を使わない固定長の輪(古い番号から上書き)。番号 0 は「不明」で、覚えない・一致しない。
Fields§
§slots: [AtomicU64; 32]§next: AtomicUsizeImplementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ClosedRing
impl RefUnwindSafe for ClosedRing
impl Send for ClosedRing
impl Sync for ClosedRing
impl Unpin for ClosedRing
impl UnsafeUnpin for ClosedRing
impl UnwindSafe for ClosedRing
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