Re: Multithreaded qsort(3)
- From: "Kip Macy" <kip.macy@xxxxxxxxx>
- Date: Sat, 17 Mar 2007 23:43:34 -0700
On 3/17/07, John-Mark Gurney <gurney_j@xxxxxxxxxxxxxxxxxx> wrote:
Max Laier wrote this message on Thu, Mar 15, 2007 at 18:27 +0100:
> I'd suggest to name it qsort() and put it in a separate library (not
> necessarily named libc_mt, as I don't believe there are that many
> functions in libc, that can actually gain from multithreading).
What happens when you attempt to link a library that uses qsort, but
isn't multi-thread safe? You may be able to protect calls to the
library w/ a lock, but then when it calls qsort, the library would
break..
Keeping the qsort name sounds ripe for problems down the road...
Reminds me of how Solaris blindly uses vfork for implementing
system(3). It was very easy for a naive user (me) to call system from
a multi-threaded python application. I had numerous failures that were
impossible to track back to system(3).
-Kip
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: Multithreaded qsort(3)
- From: Giorgos Keramidas
- Re: Multithreaded qsort(3)
- References:
- Multithreaded qsort(3)
- From: Diomidis Spinellis
- Re: Multithreaded qsort(3)
- From: Max Laier
- Re: Multithreaded qsort(3)
- From: John-Mark Gurney
- Multithreaded qsort(3)
- Prev by Date: Re: Multithreaded qsort(3)
- Next by Date: Re: Multithreaded qsort(3)
- Previous by thread: Re: Multithreaded qsort(3)
- Next by thread: Re: Multithreaded qsort(3)
- Index(es):