Logo
Explore Help
Register Sign In
yujunjun/autogen
1
0
Fork 0
You've already forked autogen
mirror of https://github.com/microsoft/autogen.git synced 2025-08-24 08:32:16 +00:00
Code Issues Packages Projects Releases Wiki Activity
autogen/dotnet/test/Microsoft.AutoGen.Core.Tests/InProcessRuntimeExtensions.cs

13 lines
364 B
C#
Raw Normal View History

fix: Recurrent SendMessageAsync deadlock in message handler (#5916) In the .NET InProcessRuntime we tried to minimize the amount of tasks created. Unfortunately, this results in a deadlock when a send message handler is attempting to SendMessage during the handling of the incoming message. The fix is to create a new task for delivering the message in the message processing loop, which creates a new logical stack to run the delivery, freeing the loop to process the next delivery request. * Also fixes passing exceptions and cancellations back to the waiting task. * Also fixes a build slowdown on Windows due to uv and llama-cpp Closes #5915
2025-03-12 14:58:07 -04:00
// Copyright (c) Microsoft Corporation. All rights reserved.
// InProcessRuntimeExtensions.cs
namespace Microsoft.AutoGen.Core.Tests;
public static class InProcessRuntimeExtensions
{
public static async ValueTask RunUntilIdleAndRestartAsync(this InProcessRuntime this_)
{
await this_.RunUntilIdleAsync();
await this_.StartAsync();
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.5 Page: 758ms Template: 119ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API