Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • Well, given your edit - make the variable 'resourceNeedsUpdating' volatile and do away with the secondary check in the lock. Add a variable indicating whether or not you're in the process of updating and check it before checking resourceNeedsUpdating / set it before/after calling UpdateResource, or unset resourceNeedsUpdating before calling UpdateResource. Commented Feb 18, 2011 at 1:42