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

Anderson, Paul D paul.d.anderson at boeing.com
Thu May 11 12:11:59 PDT 2006


"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...
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@you
> rhost.com
> 



More information about the jdom-interest mailing list