From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 3CDCA384400A for ; Wed, 2 Jun 2021 09:22:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3CDCA384400A Received: by mail-wr1-x429.google.com with SMTP id m18so1557651wrv.2 for ; Wed, 02 Jun 2021 02:22:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=b6vma+rMS0Cwl3QS1p35RH5XoMg3ltqSTMvx8mP+JhI=; b=L0lfYwDjW4t5NKqCXjtv3uq9+dJ5xQBdF045NnxiYSG5a39dkFKl3srXCZm3W5Bxq9 cUsv5mlcyk2x36B3StDRe639WQE7Tt9lP00uw0C8xkbKRooQU4HksUuv4ksrMuJrTAO/ xqrM/0XOF2/th6JbuFARCrSYWgef65vlEzZ1hY00icmXwnT3cXB+BlYEQKVosWXZqboE d9fYF8Mn8A+UzFaNNgqLcFNMhMtOXqEdRKo/AfHwMHKrSGxS/WmpLigR3i3Kc36PtW6W Sjb8wc5DES2B2zS2TPpS4Zy9MeQkS/Jtn+0oDr+iPUNT5JkxySSvB/HMxluCzUAQteHx 7A8A== X-Gm-Message-State: AOAM5318RpBubfbk8v/yW2yJ+PAaiHzVUbBw6WmL29n44NhxLaWEwVIq VMehzdSOt3JSDtDqhqTKW/Y8Ss2CIJa5FF064CE= X-Google-Smtp-Source: ABdhPJweW1IA2Ltv6GwrkHnslyA8rfsy2lpuXwlfMPz8e/wrNsuiiLiugQ09bvs9cmM2KDj353WtZwZGC6fpBz25tCY= X-Received: by 2002:adf:e4cc:: with SMTP id v12mr21003123wrm.185.1622625746238; Wed, 02 Jun 2021 02:22:26 -0700 (PDT) MIME-Version: 1.0 References: <6e2006356de7157302748c8cf7a9dc48@appliantology.com> In-Reply-To: From: Jonathan Wakely Date: Wed, 2 Jun 2021 10:22:15 +0100 Message-ID: Subject: Re: std::atomic_shared_ptr To: Mikhail Matrosov Cc: Thomas Rodgers , "libstdc++" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jun 2021 09:22:37 -0000 On Wed, 2 Jun 2021 at 08:10, Mikhail Matrosov via Libstdc++ wrote: > > Hi, Thomas, > > > It didn't make the cutoff for GCC11 stage1, I hope to get it into GCC12. > > Glad to hear that! > > > Also, to set expectations, it will not be a lock free atomic. > > Hm. That's surprising. And honestly does not look very useful. We can > always wrap a shared_ptr in a mutex. Which is why some people think the feature should never have been added to the standard in the first place. > There exist lock-free implementations in the wild. E.g. in folly. Would it > be possible to adopt one of those? Probably not, because it would require ABI-breaking changes to std::shared_ptr, which is out of the question.