xml-xalan-c-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David_N_Bert...@lotus.com
Subject Re: Coredump when using XalanTransformer.transform()
Date Tue, 30 Oct 2001 21:00:57 GMT

Hi Miro,

Try moving the initialize and terminate outside of the threads.  Make the
call to XalanTransformer::initialize() before you start the threads, and
the call to XalanTransformer::terminate() _after_ all XalanTransformer
instances have been deleted.  It's still a problem if
XalanTransformer::initialize() and XalanTransformer::terminate() are called
more than once per process, or if XalanTransformer::terminate() is called
when there are live XalanTransformer instances in existence.

The answer to your other question is that each thread must have its own
XalanTransformer instance, unless you want to synchronize access to the
instance yourself.  Xalan does abolutely no synchronization, for
performance reasons.  Does that answer your question?

See the ThreadSafe sample program and the ThreadTest test program for more
details.  We have run the ThreadTest program on HP-UX with hundreds of
concurrent threads without any problems.

Dave



                                                                                         

                    mvasicek@amad                                                        

                    eus.net              To:     xalan-c-users@xml.apache.org            

                                         cc:     (bcc: David N Bertoni/CAM/Lotus)        

                    10/30/2001           Subject:     Re: Coredump when using            

                    12:57 PM             XalanTransformer.transform()                    

                                                                                         

                                                                                         





Hello,

thanks for your replies. I want to make clear one thing. These two threads
are created on start-up and are persistent till the end of the process (so
I do not call initialize and terminate repeatedly). So I coredump even if I
do not call terminate.

My question was that if I use 2 local instances (each of them is owned by a
separate thread) of XalanTransformer class, whether I need to synchronize
calls to transform() method. In Xalan FAQ's is written: "...All other
objects in Xalan-C++ are not thread-safe. Each thread must have its own
instance of each object". So I guess that I follow this rule. Am I right?

Best regards & thanks, Miro.




Mime
View raw message