jjzjj

c++ - 使用 beginthreadex 创建线程时调试应用程序挂起

我在现场遇到一个奇怪的问题,我们的应用程序在启动时挂起。现场拿到custom生成的crashdump,显示主线程被beginthreadexapi卡住了。这是调用堆栈:0:006>kvChildEBP0161ebb8ntdll!KiFastSystemCallRet(FPO:[0,0,0])0161ebbcntdll!ZwWaitForSingleObject+0xc(FPO:[3,0,0])0161ebf8ntdll!RtlpWaitOnCriticalSection+0x1a3(FPO:[2,7,4])0161ec18ntdll!RtlEnterCriticalSection+0x

c# - 错误原因 CS0161 : not all code paths return a value

我已经做了一个基本的扩展方法来为我的HttpClient.PostAsync添加重试功能:publicstaticasyncTaskPostWithRetryAsync(thisHttpClienthttpClient,Uriuri,HttpContentcontent,intmaxAttempts,ActionlogRetry){if(maxAttempts1)logRetry(attempt);try{varresponse=awaithttpClient.PostAsync(uri,content).ConfigureAwait(false);response.EnsureSuc

c# - 错误原因 CS0161 : not all code paths return a value

我已经做了一个基本的扩展方法来为我的HttpClient.PostAsync添加重试功能:publicstaticasyncTaskPostWithRetryAsync(thisHttpClienthttpClient,Uriuri,HttpContentcontent,intmaxAttempts,ActionlogRetry){if(maxAttempts1)logRetry(attempt);try{varresponse=awaithttpClient.PostAsync(uri,content).ConfigureAwait(false);response.EnsureSuc