http://gwt-code-reviews.appspot.com/1490801/diff/11002/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java
File dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java
(right):

http://gwt-code-reviews.appspot.com/1490801/diff/11002/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java#newcode348
dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java:348:
boolean inProgress = purgeInProgress.getAndSet(true);
Hmmm....I don't think this is quite right still....you atomically set
inProgress to true here, then do some work, then initialize
purgeTaskStatus on line 272.  Meanwhile, another thread can come in and
see that you've set inProgress to true already, and try to reference
purgeTaskStatus (but it might not have been initialized yet).  I guess,
I'm not sure why the purgeTaskStatus.get() call is needed at all....If
it's inProgress, another thread should simply return immediately, no?
What's the reason for the purgeTaskStatus future, if we don't do
anything with it when we call get() on it?

If you need to check the purgeTaskStatus, then you need a synchronized
block that limits getting/setting it.

http://gwt-code-reviews.appspot.com/1490801/diff/11002/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java#newcode353
dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java:353:
Thread.currentThread().interrupt();
I really don't think this is necessary or correct here.  It implies that
if you are interrupted here, you must propagate that interruption
further up.  But we don't have any interrupt handling mechanism in place
here (or above).

http://gwt-code-reviews.appspot.com/1490801/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to