Skip to content

Commit 2fa26ce

Browse files
noop flush loop
1 parent 6071e25 commit 2fa26ce

File tree

1 file changed

+1
-30
lines changed

1 file changed

+1
-30
lines changed

tracer/src/Datadog.Trace/DataStreamsMonitoring/DataStreamsWriter.cs

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -301,36 +301,7 @@ private async Task ProcessQueueLoopAsync()
301301
{
302302
while (true)
303303
{
304-
try
305-
{
306-
Log.Debug("ROBC Adding points to aggregator");
307-
while (_buffer.TryDequeue(out var statsPoint))
308-
{
309-
_aggregator.Add(in statsPoint);
310-
}
311-
312-
while (_backlogBuffer.TryDequeue(out var backlogPoint))
313-
{
314-
_aggregator.AddBacklog(in backlogPoint);
315-
}
316-
}
317-
catch (Exception ex)
318-
{
319-
Log.Error(ex, "An error occured in the processing thread");
320-
}
321-
322-
if (_processExit.Task.IsCompleted)
323-
{
324-
return;
325-
}
326-
327-
// The logic is copied from https://github.com/dotnet/runtime/blob/main/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs#L26
328-
// and modified to avoid dealing with exceptions
329-
var tcs = new TaskCompletionSource<bool>();
330-
using (new Timer(s => ((TaskCompletionSource<bool>)s!).SetResult(true), tcs, _waitTimeSpan, Timeout.InfiniteTimeSpan))
331-
{
332-
await Task.WhenAny(_processExit.Task, tcs.Task).ConfigureAwait(false);
333-
}
304+
Thread.Sleep(1000);
334305
}
335306
}
336307

0 commit comments

Comments
 (0)