Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news2.arglkargh.de!easy.in-chemnitz.de!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.gui Subject: Re: Synchronization when collecting data from the EDT? Date: Tue, 07 Jun 2011 14:51:35 -0700 Organization: A noiseless patient Spider Lines: 16 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 7 Jun 2011 21:51:40 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="9mIMLLWQE/uBQz+Vsit8fg"; logging-data="14196"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18lVOauo45fRimW/rkCqnv12JBypfcMzYo=" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 In-Reply-To: Cancel-Lock: sha1:YCt//9HLJzmqs/+jshlARmB/b5k= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.gui:4585 On 6/5/2011 10:17 PM, Knute Johnson wrote: > On 06/05/2011 01:39 PM, Roedy Green wrote: >> 2. your invokeLater or event handler could interact with the GUI then >> spawn a new background thread to process the data. > That's sort of backwards from the way I need to do it. I have a running > thread that needs to collect data from some GUI components, process it > and send it along. I think Roedy is right. You can invokeLater (or invokeAndWait) and then in that Runnable kick off a new process. I guess the main question would be "send it along" where? It might make a difference. Send it back to the caller or send it elsewhere?