Skip to content

Commit 74bc141

Browse files
committed
chore: Adjust volatile for potential cross-thread access
In theory, there should not be multiple threads access to this field, but this won't hurt to add this qualifier.
1 parent 8e6585a commit 74bc141

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/OpenTelemetry/Internal/BatchExportTaskWorker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ internal sealed class BatchExportTaskWorker<T> : BatchExportWorker<T>
1515
private readonly CancellationTokenSource cancellationTokenSource = new();
1616
private readonly SemaphoreSlim exportTrigger = new(0, 1);
1717
private readonly TaskCompletionSource<bool> shutdownCompletionSource = new();
18-
private TaskCompletionSource<bool> dataExportedNotification = new();
18+
private volatile TaskCompletionSource<bool> dataExportedNotification = new();
1919
private Task? workerTask;
2020
private bool disposed;
2121

0 commit comments

Comments
 (0)