Re: updating an ImageIcon's backing BufferedImage content from multiple
threads
Lew wrote:
On Apr 6, 11:28 am, Knute Johnson <nos...@rabbitbrush.frazmtn.com>
wrote:
Lew wrote:
Knute Johnson wrote:
Do you think that a thread enqueueing(sp) an event on the EDT with
invokeLater() produces a happens before relationship with that thread
even though Thread.start() is not called? Could that same mechanism
work in calls to repaint()?
'start()' was called on the EDT.
A long time ago. Not when you call invokeLater().
I guess I don't understand why the mention of 'start()' is even
relevant, then. There are a gazillion ways to establish /happens-
before/ besides 'start()', e.g., via use of a 'synchronized' code
block.
--
Lew
Thread.start() is one of the happens before guarantees. That is any
code in a thread that calls Thread.start() happens before any code in
the started thread, and therefore visibility is guaranteed to the new
thread at the state when it was started.
--
Knute Johnson
email s/nospam/knute2009/
--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access