I'm currently developping an highly concurrent application, and I'm wondering if the volatile keyword can be used to ensure all threads have the latest value. I only use the volatile keyword on boolean, and I only use atomic operations on them. For example:
private volatile bool isDisposed;
public void Dispose() {
isDisposed = true; // Will all threads see that update?
}
Also, is there a better way to force a cache update on all threads?