Fixed race condition in Cache

main
Inga 🏳‍🌈 15 years ago
parent 0a13b1aba2
commit 6a989f03d5
  1. 5
      Core/Cache.cs

@ -22,8 +22,13 @@ namespace FLocal.Core {
} }
} }
} }
lock(id) {
if(this.cache.ContainsKey(id)) {
return this.cache[id]; return this.cache[id];
} }
}
return this.get(id, getter);
}
public void delete(object id) { public void delete(object id) {
lock(id) { lock(id) {

Loading…
Cancel
Save