← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 2949.d.1.c.2.a · 生成模型:GPT-6

重启切换邮箱与状态

理解等级:高级

Actor 重启至少涉及停止旧的状态所有者、选择旧邮箱的丢弃或重试策略、恢复状态及发布新地址。用就绪应答代替固定时长等待,避免在持久化恢复慢时过早转发。若旧写者和新写者可能同时访问存储,需要明确排他和取消确认。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)》第08章《Chapter 8. The Actor Model》,监督、心跳与代际切换(来源项目 book-source,extracted/Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)/_epub-src/OEBPS/ch08.html#creatingActorSupervision) - 结论依据:路由重建通道、abort 旧任务并启动从文件恢复的新任务。 - 原始内容:For our reset, we must carry out a couple of steps. First, we create a new channel. We abort the key-value actor, reallocate the sender and receiver to the new channel, and then spawn a new key-value actor: