gpt4 book ai didi

c# - 任务和 azure 辅助角色中未处理的异常

转载 作者:行者123 更新时间:2023-12-03 06:01:25 27 4
gpt4 key购买 nike

我有一个 Azure 辅助角色,我在其中运行多个任务。

任何任务中任何未处理的异常都会导致角色回收?

例如,在事件查看器中,我看到了以下堆栈跟踪,我相信它导致角色回收。

--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore.b__1(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch()

最佳答案

任何导致 WorkerRole 上的 Run() 方法返回的事情,都会导致角色回收。这显然包括未处理的异常。

关于c# - 任务和 azure 辅助角色中未处理的异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29382271/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com