🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.programming.threads
Article #7

Re: Looking for best design for using pthreads in C++ objects

#7
From: Webb Scales
Date: Thu, 29 Feb 1996 00:36
18 lines
1796 bytes
Harald Fuchs wrote:
> It's simply too easy to forget an appropriate catch clause.

But, that's my point exactly!  If it's easy to forget the catch clause,
then it is even easier to forget to rectify the state of the shared
data.  If you fail to unlock the mutex, your application will soon
deadlock, which will make it obvious that something is wrong and which
will suggest areas to examine; on the other hand, if the mutex is
silently unlocked, then the problem my not surface until another thread
at some distance away in the code attempts to use the shared data, and,
at that point, all indications of the source of the problem are gone.

------------------------------------------------------------------------
Webb Scales                                Digital Equipment Corporation
scales@wtfn.enet.dec.com                   110 Spit Brook Rd, ZKO2-3/Q18
Voice: 603.881.2196, FAX: 603.881.0120     Nashua, NH 03062-2711
         Rule #12:  Be joyful -- seek the joy of being alive.
------------------------------------------------------------------------
Technical Details
Message-ID: <3134F4F5.167E@zko.dec.com>
Path: arc1-ca.pugleaf.net!zk2nws.zko.dec.com!usenet
References: <3128ff8b.666031216@news.clark.net> <312A0E5F.7B2C@ix.netcom.com> <31320705.41C6@zko.dec.com> <puag248wxl.fsf@themroc.colibri.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!zk2nws.zko.dec.com!usenet
From: Webb Scales <scales@zko.dec.com>
Newsgroups: comp.programming.threads,comp.lang.c++,comp.unix.osf.osf1,comp.unix.programmer,comp.object
Subject: Re: Looking for best design for using pthreads in C++ objects
Date: Wed, 28 Feb 1996 19:36:05 -0500
Organization: Digital Equipment Corporation, DECthreads
Message-ID: <3134F4F5.167E@zko.dec.com>
References: <3128ff8b.666031216@news.clark.net> <312A0E5F.7B2C@ix.netcom.com>
  <31320705.41C6@zko.dec.com> <puag248wxl.fsf@themroc.colibri.de>
NNTP-Posting-Host: chook.zko.dec.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 2.0 (X11; I; OSF1 V3.2 alpha)