<AWT Dev> numAppContexts in AppContext modified in not-thread-safe way.

Clemens Eisserer linuxhippy at gmail.com
Thu Aug 18 17:34:15 PDT 2011

Hi David,

 Part of the missing picture here is how AppContexts get created and
> dispose()'d as it may be that the way AppContext is used you can't actually
> get concurrent modification of numAppContexts. But there's no way to discern
> that from the AppContext code so it would be safer to use the AtomicInteger.

I had a look how AppContexts are created, and at least the IcedTea plugin
calls SunToolkit.createNewAppContext() in a fresh thread without any
synchronization (as does caciocavallo-web).
I don't this with all the code the non-atomicity of operations on
numAppContexts is a real-world problem, but on the other hand - it wouldn't
hurt to have this replaced with correct code ;)

- Clemens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20110819/3333398f/attachment.html 

More information about the awt-dev mailing list