<AWT Dev> numAppContexts in AppContext modified in not-thread-safe way.
linuxhippy at gmail.com
Thu Aug 18 17:34:15 PDT 2011
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 ;)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the awt-dev