[ale] Thread safe coding, Java or C
James Sumners
james.sumners at gmail.com
Fri Jul 19 16:47:14 EDT 2013
I'm guessing you are asking which is easier to develop thread safe
applications in. If that's the case, I'm going to say C is not it.
Evidence -- [1].
For any hope of "easy" you'd have to switch to C++. Doing that,
though, means spending the time to find the library that works for
you. Hell, Id Software said "eff it" and wrote their own -- [2] (see
[3] for a good review of their model).
I've been doing a lot of Java (web) development recently. I haven't
had to worry too much about thread safety. But when I have had to give
it consideration, it was not nearly as complex as the aforementioned
methods. Mostly it comes down to accessing storage (hash tables and
the like) in a safe way, and there are stdlib classes for that.
[1] -- http://stackoverflow.com/questions/2029605/thread-safety-in-c
[2] -- https://github.com/id-Software/DOOM-3-BFG/blob/master/neo/idlib/Thread.h
[3] -- http://fabiensanglard.net/doom3_bfg/threading.php
On Fri, Jul 19, 2013 at 3:48 PM, Geoffrey Myers
<lists at serioustechnology.com> wrote:
> Subject says it all. What say you?
>
> --
> From my iPhone
> Geoffrey Myers
--
James Sumners
http://james.roomfullofmirrors.com/
"All governments suffer a recurring problem: Power attracts
pathological personalities. It is not that power corrupts but that it
is magnetic to the corruptible. Such people have a tendency to become
drunk on violence, a condition to which they are quickly addicted."
Missionaria Protectiva, Text QIV (decto)
CH:D 59
More information about the Ale
mailing list