On 05.06.2008 00:22:17 David Gerdt wrote: > According to the website documentation on multithreading: > > "There is also a known issue with fonts being jumbled between threads > when using the Java2D/AWT renderer (which is used by the -awt and > -print output options). In general, you cannot safely run multiple threads > through the AWT renderer." > > Three questions: > 1. Am I correct in my cursory observation that this is also true for > the PCL renderer?
Possibly, as the PCL renderer uses AWT to handle non-standard fonts. > 2. If it is the case that the PCL renderer also suffers, can someone > elaborate on the cause of these problems? A high level, very basic > understanding is all I'm curious for. I'm definitely inexperienced with > thread related programming, but from what I gather, the AWT java > classes are thread safe, correct? That's what they say, yes. But I'm not 100% sure that applies to the Java2D infrastructure which is part of AWT (Graphics2D, Font etc.). I have never done any multi-threading tests on the Java2D-based renderers myself (I only regularly check PDF and PS). > Am I making an illogical jump from reading > "AWT renderer" in the FOP docs and assuming that the problem has > something to do with the AWT classes in Java? Not necessarily. I can't tell with 100% confidence that any multi-threading problems in our Java2D-based renderer cannot come from bugs in FOP (i.e. our misusing the AWT/Java2D classes). > 3. Any general pointers on how to use multithreading profitably with > the PCL renderer? Right now, the app I wrote (standalone socket server) is > multithreaded but synchronizes access to the Transformer class which > seems to solve my problem from #1 but basically makes it a single > thread program again. Not really. I guess, if you experience any problems in this area, some debugging may be necessary. Rereading the Javadocs for the AWT classes in use will also be a good idea. The whole thing might require a full code review. > Thanks for any insight. HTH Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
