Skip to content

Commit 17bcbb0

Browse files
committed
Added ForeverTask
1 parent 49f6f28 commit 17bcbb0

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using System.Threading.Tasks;
2+
3+
namespace Cleipnir.ResilientFunctions.Helpers;
4+
5+
public static class ForeverTask
6+
{
7+
public static Task Instance { get; } = new TaskCompletionSource().Task;
8+
}

Core/Cleipnir.ResilientFunctions/Queuing/QueueManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ internal void Interrupt()
153153
finally
154154
{
155155
if (!_flowState.TryResumeSubflow())
156-
await new TaskCompletionSource<MessageData?>().Task;
156+
await ForeverTask.Instance;
157157

158158
await delayCts.CancelAsync();
159159
delayCts.Dispose();

0 commit comments

Comments
 (0)