From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,4753a27d8ceddc44,start X-Google-Attributes: gidf678f,public X-Google-Thread: 109fba,4753a27d8ceddc44,start X-Google-Attributes: gid109fba,public X-Google-ArrivalTime: 1993-02-12 04:22:23 PST Xref: sparky comp.lang.c++:20920 comp.unix.osf.misc:102 Path: sparky!uunet!caen!uwm.edu!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!jb7m+ From: jb7m+@andrew.cmu.edu (Jon C. R. Bennett) Newsgroups: comp.lang.c++,comp.unix.osf.misc Subject: Re: Thread-safe libraries for C++? Message-ID: Date: 12 Feb 93 12:22:23 GMT Article-I.D.: andrew.gfT2ATS00WBEA4Tjhf References: <1993Feb12.184345.19220@walter.bellcore.com> Organization: Robotics Institute, Carnegie Mellon, Pittsburgh, PA In-Reply-To: <1993Feb12.184345.19220@walter.bellcore.com> doel@bbq.uucp (Mike Doel) writes: > //obtain the "mutex", however that's done > > cout << "Now it's safe to do output" > > //release the mutex > > This strikes me as terribly kludgy. Obtaining and release the mutex should > be done by the stream class, not the user of it. the stream class should not obtain the mutex for you since few aplications would need it, if thats what you want then, write a subclass of streams that does the locks and then just calls the normal stream methods jon