[ale] Thread safe coding, Java or C
Scott Plante
splante at insightsys.com
Mon Jul 22 18:01:00 EDT 2013
I won't say which to use because my C threading experience is a couple of decades old or more. I will add some comments, though.
I second Ed Cashin's comments on functional languages and techniques, especially if the threads are all working on a single problem. It's less of an issue if you're application is such that each thread can work mostly independently, but the more the threads are working on a common problem, the bigger problem synchronization will be using the typical methods.
The standard Java libraries have grown over the years with many tools to make things easier and safer (e.g. Fork/Join framework added in JDK 7). Despite the nay-sayers, Java can be very fast. The new Java JDK 8 Project Lambda introduces functional techniques across the Java API, largely to make multi-threading easier and safer. This will be a paradigm shift for a lot of Java programmers, though, unless they happen to be separately familiar with the functional style. I'm not sure what your project timeline is, but a "feature complete" JDK8 release is out now, with a final RC in January and GA in March.
Scott
----- Original Message -----
From: "Geoffrey Myers" <lists at serioustechnology.com>
To: "ALE run Linux!" <ale at ale.org>
Sent: Friday, July 19, 2013 3:48:08 PM
Subject: [ale] Thread safe coding, Java or C
Subject says it all. What say you?
--
More information about the Ale
mailing list