[jdom-interest] Re: JDOM -- threads?

Mike.Brenner mikeb at mitre.org
Thu May 11 14:04:21 PDT 2006

Ummmh. I thought not thread-safe meant
non-reentrant code, so that operations
in one thread can interfere with
operations in another thread;
if you bring in "interrupted by another thread"
you limit yourself to a particular
implementation of threads.

Anderson, Paul D wrote:
> "Not thread-safe" means that operations running in one thread may not
> complete properly if that thread is interrupted by another. 
> The simplest solution (but perhaps not the most efficient) is to label
> any unsafe operations "synchronized". This means the operation will run
> to completion before the other thread is allowed to interrupt.
> Many functions and features are not thread-safe because guaranteeing
> thread safety can be complicated and inefficient. IMHO you really
> shouldn't do thread-based programming without a little education first
> -- the Java Tutorial is a good place to get more info.
>> -----Original Message-----
>> From: Frances [mailto:fdr58 at yahoo.com] 
>> Sent: Thursday, May 11, 2006 11:33 AM
>> To: jdom-interest at jdom.org
>> Subject: [jdom-interest] Re: JDOM -- threads?
>> Frances wrote:
>>> just read in jdom.org that JDOM is not thread-safe..  what 
>> does this 
>>> mean exactly? (don't know much about threads..)  that JDOM does not 
>>> include thread APIs, or that you can't do threads AT ALL 
>> with it?  For 
>>> my project I have to be able to set threads...
>>> (can I use thread-related classes from system API to make it 
>>> thread-safe?)
>> and what about DOM, SAX API?  what are best alternatives for 
>> creating XML? (just Java I/O?  JavaScript?  any better 
>> ideas?)  thanks...

More information about the jdom-interest mailing list