tag:blogger.com,1999:blog-15136575.post1786671109577390961..comments2023-10-17T12:00:16.772+01:00Comments on Code rant: The First Rule of Threading: You Don’t Need Threads!Mike Hadlowhttp://www.blogger.com/profile/16441901713967254504noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-15136575.post-30168230500789884802011-07-11T00:25:26.504+01:002011-07-11T00:25:26.504+01:00For anyone this who's using Java for a project...For anyone this who's using Java for a project: async I/O on Java is primarily provided by the nio and nio.2 (jdk7 only) libraries in the java.io and java.nio packages. See <a href="http://download.oracle.com/javase/6/docs/technotes/guides/io/index.html" rel="nofollow">http://download.oracle.com/javase/6/docs/technotes/guides/io/index.html</a>, <a href="http://java.sun.com/developer/technicalArticles/javase/nio/" rel="nofollow">http://java.sun.com/developer/technicalArticles/javase/nio/</a>.<br /><br />Like C# programmers, Java programmers tend to be excessively thread-happy, so I'm glad to see you highlighting the (ab)use of threads for I/O concurrency in cases where async I/O is more than good enough.Craig Ringerhttps://www.blogger.com/profile/02343803844223399065noreply@blogger.comtag:blogger.com,1999:blog-15136575.post-14233075524945668972011-07-08T23:26:55.184+01:002011-07-08T23:26:55.184+01:00Here's a similar technique using Scala's n...Here's a similar technique using Scala's new parallel collections:<br /><b>batch.par.foreach( item => ProcessItem(item))</b>hohonuulihttps://www.blogger.com/profile/09429385784463734505noreply@blogger.comtag:blogger.com,1999:blog-15136575.post-791853548800291842011-07-08T23:24:08.973+01:002011-07-08T23:24:08.973+01:00This comment has been removed by the author.hohonuulihttps://www.blogger.com/profile/09429385784463734505noreply@blogger.comtag:blogger.com,1999:blog-15136575.post-87162432281083676772011-07-06T14:32:38.386+01:002011-07-06T14:32:38.386+01:00Jeffrey Richter also provides a nice explanation o...Jeffrey Richter also provides a nice explanation of this on channel 9:<br /><br /><a href="http://channel9.msdn.com/Shows/AppFabric-tv/AppFabrictv-Threading-with-Jeff-Richter" rel="nofollow">AppFabrictv-Threading-with-Jeff-Richter</a>Octoberclubhttps://www.blogger.com/profile/15981859879346930724noreply@blogger.comtag:blogger.com,1999:blog-15136575.post-1266158329693221562011-07-06T09:33:20.309+01:002011-07-06T09:33:20.309+01:00It is worth adding that I would also give Rx (Reac...It is worth adding that I would also give Rx (Reactive Extensions) a check when going this way.<br />Rx really helps when you use the Begin/End pattern.<br /><br />http://msdn.microsoft.com/en-us/data/gg577609<br /><br />Thanks for this post!<br />ArielAriel Ben Horeshhttps://www.blogger.com/profile/12072905222092541307noreply@blogger.com