News for hackers. Stuff that matters.
Re:Clojure Concurrency Tutorial by chongli on Tuesday April 09, 2019 @11:58PM (#19621710)
What's the advantage of downloading multiple massive files in parallel, assuming you can saturate the link with just one? Isn't it better to finish one file before moving on to the next?

If you can't saturate the link with one file, then you should consider something like bit torrent.

Re:Clojure Concurrency Tutorial by tombert on Wednesday April 10, 2019 @10:56AM (#19625306)
I'm just saying that as a dumb example of something that isn't terribly CPU intensive, but would block up the threads, but even then, let's assume that the downloads are really slow, so that it's not anywhere near saturating my network speed. The go-blocks in core.async would still block the other go blocks. This wouldn't be an issue with Go.
Re:Clojure Concurrency Tutorial by quadcore on Wednesday April 10, 2019 @01:52PM (#19627120)
I/O is exactly the kind of stuff that should happen smoothly in goroutines or go blocks. It's kind of the quintessential case because I/O has a lot of sleeps and waits (noop or stalls in other terms).

When you're downloading a big file for example, I'm not an expert of that but I expect that there's gonna be a lot of cpu stalls in there. Same for the network adaptor and disk.

Re:Clojure Concurrency Tutorial by kitd on Wednesday April 10, 2019 @04:33AM (#19622848)
It's an example. Think of something else, eg an HTTP client call that sits waiting for a response, instead. The call parallelism is the issue being discussed.