This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: Thread-safe libio
- To: Nathan Myers <ncm@best.com>
- Subject: Re: Thread-safe libio
- From: Ulrich Drepper <drepper@cygnus.com>
- Date: 15 May 1999 12:35:34 -0700
- Cc: libstdc++@sourceware.cygnus.com
- References: <199905151906.MAA25422@shell7.ba.best.com>
- Reply-To: drepper@cygnus.com (Ulrich Drepper)
Nathan Myers <ncm@best.com> writes:
> > There is a lot of reason _not_ to do this. If this kills performance
> > then the whole of the iostream library will be shot. To my mind this
> > option is completely unacceptable.
>
> I agree with Jeff.
>
> It would be madness to kill iostream performance, slowing it by two
> orders of magnitude, unnecessarily. The Standard iostream facilities
> define a way to get locking, and the Standard operators << and >> will
> use it.
You both miss the point. The talk was about the method used, not the
place where locking is performed.
Whenever locking is done it has to use the lockfile() functions since
they know how to interact with the thread library.
Whether all operator do lock is another question. Nathan, you might
remember that I proposed to use locking operator a long time ago.
This would then work similar to the stdio implementation.
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------