Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: NIO multiplexing + thread pooling Date: Fri, 30 Sep 2011 08:49:40 -0700 Organization: A noiseless patient Spider Lines: 14 Message-ID: References: <9e8aqfFnorU1@mid.individual.net> <9efsnrFoviU1@mid.individual.net> <2026012.1217.1317394005581.JavaMail.geo-discussion-forums@prfc6> <5746278.1755.1317396632057.JavaMail.geo-discussion-forums@prec11> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 30 Sep 2011 15:49:42 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="XjIWM99mD7Ijfdu600oVPA"; logging-data="695"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ptEAuiijMYvqF7xWL7vb7vNDeYlWmXQs=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0) Gecko/20110922 Thunderbird/7.0 In-Reply-To: <5746278.1755.1317396632057.JavaMail.geo-discussion-forums@prec11> Cancel-Lock: sha1:9ftEC9Mrj/GE+iaqhADmgXXWuCc= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8416 On 9/30/2011 8:30 AM, Lew wrote: > markspace wrote: >> Not all multi-threading requires context switching either. > > Huh? > Imagine a situation where the number of threads is matched to the number of CPUs. No need to switch out a context there (though it might happen anyway, there isn't a *need*). Just pass data back and forth. Memory barriers (happens-before in Java) is all you need in this case.