Fixed race condition in Cache

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

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

Loading…
Cancel
Save