You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code checks _changed but not under locks. It doesn't double-check it either. It seems like this race might be possible:
Thread 1 and 2 enter this method
Thread 1 sees _changed is false
Thread 2 sees _changed is false
Thread 1 obtains lock, and scans files and updates _previousHash and sets _changed = true
Thread 2 obtains lock, scans files, comparing the just-updated-by-Thread-1 value of _previousHash with the new hash value, and concludes _changed is false.
The text was updated successfully, but these errors were encountered:
runtime/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PollingWildCardChangeToken.cs
Lines 87 to 106 in c5e8f83
This code checks
_changed
but not under locks. It doesn't double-check it either. It seems like this race might be possible:_changed
is false_changed
is false_previousHash
and sets_changed = true
_previousHash
with the new hash value, and concludes_changed
is false.The text was updated successfully, but these errors were encountered: