Comment

Comment by afhof

Does anyone seriously think that the difficulty with parallelizing code is the amount of boilerplate? The real problem is synchronizing multiple threads; being too lenient means deadlocks; being too strict means under utilization. The map() function doesn't really help with either of those.

In addition, it looks like you are unfairly picking on Java. The producer consumer model presented isn't anywhere near what a competent programmer would do. Building your consumer from within a method called Producer? Calling isinstance (or instanceof) to check if the "poison pill" is put in the queue? These are the signs of a crappy programmer, not a crappy language.

parent afhof 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton