【问题标题】:Service Fabric Actors, ReceiveReminderAsync and CancellationTokensService Fabric Actors、ReceiveReminderAsync 和 CancellationTokens
【发布时间】:2017-07-18 14:27:59
【问题描述】:

我有一个使用提醒的 Azure Service Fabric 参与者。

  • 如果我在执行者处于 ReceiveReminderAsync 方法的中间时删除或升级我的服务会发生什么?
  • 我可以向ReceiveReminderAsync 方法发送取消令牌吗?

【问题讨论】:

    标签: azure azure-service-fabric cancellationtokensource service-fabric-actor


    【解决方案1】:

    Actor 默认遵循single entry 模式。 在处理提醒回调时,不会发生其他操作(如停用)。删除(除非强制)和升级会延迟到操作完成。

    接收提醒使用IRemindable接口。它不支持取消。

    【讨论】:

    • actor方法可以支持取消token吗?那么你如何从客户端向演员请求取消?当从客户端调用 token.Canel() 时,我没有成功看到参与者注册方法命中断点。
    猜你喜欢
    • 2018-03-14
    • 2016-04-30
    • 2018-11-06
    • 2016-09-08
    • 2016-06-23
    • 2017-02-05
    • 2016-06-28
    • 2016-11-18
    • 2017-12-30
    相关资源
    最近更新 更多