Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace System.IO.Tests
public class FileStream_DeleteOnClose : FileSystemTest
{
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsFileLockingEnabled), nameof(PlatformDetection.IsThreadingSupported))]
[OuterLoop]
public async Task OpenOrCreate_DeleteOnClose_UsableAsMutex()
{
var cts = new CancellationTokenSource();
Expand Down Expand Up @@ -69,7 +70,7 @@ public async Task OpenOrCreate_DeleteOnClose_UsableAsMutex()
}

// Wait for 1000 locks.
cts.CancelAfter(TimeSpan.FromSeconds(60)); // Test timeout.
cts.CancelAfter(TimeSpan.FromSeconds(120)); // Test timeout (reason for outerloop)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmds I'd like to assume this is the timeout you wanted me to extend? I ask because there are 3 Task.Delay calls above. Should I extend those as well? I wonder if 1 ms delays are long enough.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the one.

For some reason when I read it I hear:

image

Volatile.Write(ref locksRemaining, 500);
await Task.WhenAll(tasks);

Expand Down