Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Webb Scales <scales@zko.dec.com>
Subject: Re: Looking for best design for using pthreads in C++ objects
Date: 1996/02/28	[thread overview]
Message-ID: <3134F4F5.167E@zko.dec.com> (raw)
In-Reply-To: 312A0E5F.7B2C@ix.netcom.com

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.
------------------------------------------------------------------------



  parent reply	other threads:[~1996-02-28  5:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-02-19  5:00 Looking for best design for using pthreads in C++ objects Thom Anderson
1996-02-20  5:00 ` Nasser Abbasi
1996-02-20  5:00 ` David Brownell
1996-02-26  5:00   ` Webb Scales
     [not found]     ` <313DEF19.5B69@ix.netcom.com>
     [not found]       ` <313EDB0B.FF6@zko.dec.com>
1996-03-08  5:00         ` David Brownell
1996-02-27  5:00   ` Harald Fuchs
1996-02-28  5:00   ` Webb Scales [this message]
1996-03-06  5:00   ` David Brownell
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox