Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: markspace Newsgroups: comp.lang.java.programmer Subject: Re: threadpool and ui paint Date: Tue, 13 May 2014 10:46:09 -0700 Organization: A noiseless patient Spider Lines: 17 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 13 May 2014 17:46:11 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="9358cda03e1e0dfd3c4b757daa608707"; logging-data="16990"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/K0DyRYp01NLIgqFku2DkylmrToOY3Atc=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: Cancel-Lock: sha1:LDNyf6D/8T9bnfR6SUmotgPkRHM= Xref: csiph.com comp.lang.java.programmer:28458 On 5/13/2014 10:22 AM, Eric Sosman wrote: > I don't think using synchronizedCollection() helps here. It will > ensure that individual actions on the collection are atomic, but will > not atomize (?!) sequences of actions. In particular, you can still > get a ConcurrentModificationException. Yes, if the collection is modified as the EDT is attempting to read it, that'll happen. I'm not sure that MVC will solve all of these issues, but a better architecture will definitely help decompose the problem(s) into easier pieces. I don't really like the way M. Kraus has designed his threading code at all.