Re: [xml] 2.4.27 thread problems



On Tue, Nov 19, 2002 at 04:27:31PM +0300, Alexey Efimov wrote:
GPsc> Does testThreads work or does it dump core?

Well, this test is broken.
It doesn't return from pthread_join(...) (in the first call) function in the loop:

    for (i = 0; i < num_threads; i++) {
        ret = pthread_join(tid[i], &results[i]);
        if (ret != 0) {
        perror("pthread_join");
        exit(1);
        }
    }


Why is this broken?

It doesn't seem broken to me. The call to pthread_join will block on each
thread in turn waiting for it to finish. That's the usual paradigm for
waiting for threads using pthreads.

The question still remains - does testThreads work or not when you build
libxml2?

Yours,

Gary
-- 
Gary Pennington
Solaris Kernel Development,
Sun Microsystems
Gary Pennington sun com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]