News for hackers. Stuff that matters.
Re:Go Concurrency Patterns: Pipelines and cancellation by songgao on Thursday March 13, 2014 @08:47PM (#7396246)
I guess an obvious difference is that Go has these stuff built into runtime and syntax, which makes those light-weight threads / tasks a first class thing.

Furthermore, is there a way in "Java SingleThreadExecutor" and its related components that allow automatic scheduling tasks on different threads? For example, you are on a quad-core and you want to have 4 threads running together, with millions of tasks mapped to 4 threads and dynamically balanced.

Re:Go Concurrency Patterns: Pipelines and cancellation by saryant on Friday March 14, 2014 @12:45AM (#7397035)
I believe that's what the ForkJoinPool is for.

http://docs.oracle.com/javase/7/docs/api/java/util/concurren...

Re:Go Concurrency Patterns: Pipelines and cancellation by crypto5 on Thursday March 13, 2014 @11:58PM (#7396899)
Sure, you can replace SingleThreadExecutor by Executors.newFixedThreadPool(4)