Skip to content

Instantly share code, notes, and snippets.

@dcomartin

dcomartin/ClassC.cs

Created Jul 15, 2020
Embed
What would you like to do?
public class ClassC
{
private string? _state;
public async Task<int> NotThreadSafe(string state)
{
_state = state;
// Delay this Task so we can end up having ClassB change the state before we return the length
if (state.Length > 0)
{
await Task.Delay(10);
}
return _state.Length;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.