Re: [xml] libxml2 and pthreads
- From: Ben Greear <greearb candelatech com>
- To: veillard redhat com
- Cc: xml gnome org
- Subject: Re: [xml] libxml2 and pthreads
- Date: Thu, 19 Aug 2004 12:57:31 -0700
Daniel Veillard wrote:
On Thu, Aug 19, 2004 at 12:32:29PM -0700, Ben Greear wrote:
I do not have to link libpthread for normal malloc and free though,
and when I fork() from a signal handler my program doesn't deadlock
deep in libpthread :)
Doing anything complex in a signal handler will bite you hard anyway
sooner or later. Advice : don't do this...
Yep...it's just code to write out the last bit of debugging info
before abort().
Anyway, I've seen other libraries that allowed one to set the lock
callback methods at run-time. Something like:
xmlSetLock(int my_lock_method(), void* myData, xmlFoo xml_thing_that_needs_a_lock);
If you did something like that, then there would be no pthread dependency,
but those that are running multi-threaded apps can provide their own locking
primitives (based off of libpthread or their threading package of choice).
Ben
--
Ben Greear <greearb candelatech com>
Candela Technologies Inc http://www.candelatech.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]