220 15387 <2661329.DH01uZEFxC@tjmaciei-mobl4> article
Path: news.gmane.org!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: get count of std::weak_ptr objects tracking a
 shared resource
Date: Tue, 30 Dec 2014 10:47:05 -0200
Lines: 22
Approved: news@gmane.org
Message-ID: <2661329.DH01uZEFxC@tjmaciei-mobl4>
References: <a9c1d3d5-761d-44df-b722-ae649440ea77@isocpp.org> <14793018.ckK0tnNYDa@tjmaciei-mobl4> <CAEWLptzf_oyFFsyUpdCL7zJ6e70MGgFcZfqSTq3DrKTb3swd0Q@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1419943641 30364 80.91.229.3 (30 Dec 2014 12:47:21 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 30 Dec 2014 12:47:21 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBUV5RKSQKGQEYF2J35I@isocpp.org Tue Dec 30 13:47:16 2014
Return-path: <std-proposals+bncBCB4TK757YBRBUV5RKSQKGQEYF2J35I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-we0-f198.google.com ([74.125.82.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRBUV5RKSQKGQEYF2J35I@isocpp.org>)
	id 1Y5wCh-00064y-Uu
	for gclcip-std-proposals@m.gmane.org; Tue, 30 Dec 2014 13:47:16 +0100
Original-Received: by mail-we0-f198.google.com with SMTP id q59sf546798wes.9
        for <gclcip-std-proposals@m.gmane.org>; Tue, 30 Dec 2014 04:47:15 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:to:subject:date:message-id:user-agent
         :in-reply-to:references:mime-version:content-type:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=usxFeHstSeq8NUhWlF5cy2NDgWPA60JRHzBKZyA8sEM=;
        b=LltC5YYZTO2oVM9qxJpbu7cNvX5pdMpNLGSnyxv41cjabBsU7CQk98ymQw/s4rLK9N
         6bDRvnQ4ohi2RM5zlIpfFzQ8YuTMgWwc+DIn1s+fPLbrQzeCT/bd4VBhmiP1FbU86fCo
         FtZQYb6+4rsoyyBHpJu2NJRmsVQHvl+cKTpif5+/KzbXvTXJAIok9tHaczUBs6evtb+s
         ukiAZUS1kSshLkDPM2K+fxAWbFkFKf+oqtHEU1XhsKsZALyNo/PJcI7mY/7A52PPCJcy
         haCg8co+FleirSGBd8g6O1dm6JQj5C3yRnvl2FLW4Kikxck76fWQXMg8L/U97Udi0z4U
         92Ng==
X-Gm-Message-State: ALoCoQndPNj7gR2GTq2sqrrx8EIcqhANYIM1f03uwau5R1tDuKesSxIizRi8d/Est2PhIVEW9xih
X-Received: by 10.112.9.199 with SMTP id c7mr248879lbb.7.1419943635332;
        Tue, 30 Dec 2014 04:47:15 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.108.80 with SMTP id hi16ls1501677wib.15.canary; Tue, 30
 Dec 2014 04:47:12 -0800 (PST)
X-Received: by 10.180.12.75 with SMTP id w11mr107671660wib.9.1419943632735;
        Tue, 30 Dec 2014 04:47:12 -0800 (PST)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [2a01:4f8:d13:f81:21c:14ff:fe01:12a3])
        by mx.google.com with ESMTP id dj9si60665078wjb.102.2014.12.30.04.47.12
        for <std-proposals@isocpp.org>;
        Tue, 30 Dec 2014 04:47:12 -0800 (PST)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3 as permitted sender) client-ip=2a01:4f8:d13:f81:21c:14ff:fe01:12a3;
Original-Received: from tjmaciei-mobl4.localnet (unknown [189.0.120.56])
	by gondolin.macieira.info (Postfix) with ESMTPSA id DDC6011BAEF
	for <std-proposals@isocpp.org>; Tue, 30 Dec 2014 04:47:11 -0800 (PST)
User-Agent: KMail/4.14.3 (Linux/3.11.10-21-desktop; KDE/4.14.3; x86_64; ; )
In-Reply-To: <CAEWLptzf_oyFFsyUpdCL7zJ6e70MGgFcZfqSTq3DrKTb3swd0Q@mail.gmail.com>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3
 as permitted sender) smtp.mail=thiago@macieira.org
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:15387
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/15387>

On Tuesday 30 December 2014 09:35:48 Douglas Boffey wrote:
> And I suppose wrapping it in a mutex is no go?

That would imply that all the operations that change those values need to be 
wrapped in a mutex. So you're introducing a performance bottleneck for every 
operation just for the ability to get the count.

Is it worth it?
-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.
