From -3541468212836402007
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ffc1e,b0722b5d78ee24fe
X-Google-Attributes: gidffc1e,public
X-Google-Thread: f78e5,25827c9ceb81badc
X-Google-Attributes: gidf78e5,public
From: "J. Van Damme" <ecogreen.joris.vandamme@ping.be>
Subject: Re: string/cow/algorithm
Date: 1998/09/04
Message-ID: <01bdd776$9c27aac0$LocalHost@tbox0108>#1/1
X-Deja-AN: 387784065
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
References: <35D9AE1C.7553@pratique.fr> <35e84662.881936868@nr1.toronto.istar.net> <6seoh1$rgk$1@nnrp1.dejanews.com> <6sh2rk$k1t$1@nnrp1.dejanews.com> <6sjua9$s9i$1@shell7.ba.best.com> <35eeb7e0.0@news.pacifier.com>
Organization: EUnet Belgium, Leuven, Belgium
X-Original-Date: 3 Sep 1998 20:13:37 GMT
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUANe+yUeEDnX0m9pzZAQEdzQF/eQ7gCSmCdBaJMbptJS5WvRxiOLrzJFLl d+S2CxhUbGIgZLZKa5Bz8gPSqOhEv+EM =Die/
Newsgroups: comp.std.c++,comp.programming.threads

Marco Dalla Gasperina <marcodg@pacifier.com> schreef in artikel
<35eeb7e0.0@news.pacifier.com>...
> Since reading this thread, I've been toying with an idea
> of separating mutating/non-mutating methods into separate
> classes.  You can get a read/write-handle to an object by
> querying it for read/write access. 
> 
> The read/write handle acts as a proxy to the object and maintains 
> a lock on the object until the handle goes out of scope.
> 
> You can play some games in the locking strategy like 
> granting unlimited read handles if there are no write
> handles out there.  

Seems to me that, beside narrowing it down to a single operation in the
data, rather than sequences of operation on the data, you are talking about
excactly the same thing I was talking about few days ago. However, since
than I read about this same thing a couple of times in other entries in
this group, and one seems to call these things <read-write-locks>. I don't
think a Win32 system has these things, I think the people using them or
perhaps Unix men.

The read-write-lock Win32 misses is implementable, though. And I should
think there must be numerous implementations. The one I did was in this
news few days ago, a Delphi implementation (Re: Use of critical section). I
did not know the thing seems to exist in other environments, at that time
(I was foolish enough to think I had an idea. Oh well).


Joris Van Damme
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]



