r/programming • • Feb 22 '15

Java Makes Programmers Want To Do Absolutely Anything Else With Their Time

http://www.forbes.com/sites/quora/2015/02/21/java-makes-programmers-want-to-do-absolutely-anything-else-with-their-time/
35 Upvotes

636 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Feb 22 '15

[deleted]

3

u/[deleted] Feb 22 '15

Java has way better standard library support for concurrency though. From what I can tell, C# lacks an equivalent for ConcurrentLinkedQueue and ConcurrentSkipListMap. Also no ForkJoinPool or Phaser.

3

u/Eirenarch Feb 22 '15

How is a ForkJoinPool different from a TaskScheduler - https://msdn.microsoft.com/en-us/library/system.threading.tasks.taskscheduler(v=vs.110).aspx

Also why do you care if your ConcurrentQueue is a linked list or not? .NET's ConcurrentQueue seems to be a linked list of small arrays but this is an implementation detail that I do not expect anyone to care about.

3

u/[deleted] Feb 22 '15

The ForkJoinPool uses a pretty great scheduling algorithm, which allows for better cache locality and better handling of blocking IO.

The ConcurrentLinkedQueue implementation is wait-free, which is very important in soft real-time applications. The ConcurrentSkipListMap implementation allows truly concurrent reading and writing, using compare-and-swap.

In comparison, all concurrent collections in C# seem to use locks. Most applications don't need the distinction, but some (e.g. finance, game servers, ...) do need them.

→ More replies (2)