220 4736 <CAGqM8fY7g_xN6vvR3s2G0qn3_Y7vxxiLAf-t7T6B7eWu_h=vkw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Lawrence Crowl <crowl@googlers.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: lock free traits for functions
Date: Wed, 29 May 2013 15:18:48 -0700
Lines: 97
Approved: news@gmane.org
Message-ID: <CAGqM8fY7g_xN6vvR3s2G0qn3_Y7vxxiLAf-t7T6B7eWu_h=vkw@mail.gmail.com>
References: <4ed4041c-a458-4fc8-ae3d-7534d5d261c2@isocpp.org>
	<CAGqM8fbdm705MOoFm0sjKMvxxFHthiFTKo10DtTRaez_iSE+tw@mail.gmail.com>
	<CAOSC0-X=oaikYRbDAY+wf0XZgt8mYre=0aOD9AD4mnYcPyVQRg@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: ger.gmane.org 1369865931 5293 80.91.229.3 (29 May 2013 22:18:51 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 29 May 2013 22:18:51 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCY3D77DYUDBBSX5TGGQKGQEL2H5PAA@isocpp.org Thu May 30 00:18:53 2013
Return-path: <std-proposals+bncBCY3D77DYUDBBSX5TGGQKGQEL2H5PAA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qa0-f72.google.com ([209.85.216.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCY3D77DYUDBBSX5TGGQKGQEL2H5PAA@isocpp.org>)
	id 1Uhohn-0005mk-IG
	for gclcip-std-proposals@m.gmane.org; Thu, 30 May 2013 00:18:51 +0200
Original-Received: by mail-qa0-f72.google.com with SMTP id bs12sf5921526qab.3
        for <gclcip-std-proposals@m.gmane.org>; Wed, 29 May 2013 15:18:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlers.com; s=googlers;
        h=x-beenthere:mime-version:in-reply-to:references:date:message-id
         :subject:from:to:x-original-sender:x-original-authentication-results
         :reply-to:precedence:mailing-list:list-id:x-google-group-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=6nTtvdd9osOuRLdU7WHHGFMmg9MPYf0Wwskqc7S8C1o=;
        b=DMp3xgNmXe/k7WOwVrwW1C904a3aNQh6htWZDNrw6IS9dDgqJqQWe6+HSRhc0FntHo
         YoXw7Ri97cHlLTJG43IEfLwLFN5UjT4xChmJzCERYN2SYYmDFyar1H83gPjE2yvi+hYc
         T4DiXtOjbsuiw5QGeEplqRvPrs0UyNFpdG7pU=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=x-beenthere:mime-version:in-reply-to:references:date:message-id
         :subject:from:to:x-gm-message-state:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-google-group-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=6nTtvdd9osOuRLdU7WHHGFMmg9MPYf0Wwskqc7S8C1o=;
        b=nC1Klgdy/WSmrs/To1zezlsJI92CcZ9f19oovuTT3VAfAMwhimFiYlfq8f6HeU5Yzr
         MKU3NFWgBYScTqGoIUZBSOYJ6sQgRFgpt0Rp/hKK/chWmWAfZsrm+YhGwdmMU6sqaBRB
         6Jcfd2FA21znDzel1kH3Viu6kcNBaeK2RmZ8+9WhF4nOHjb69EcxWNK8gTcfVl9yUp+g
         xHXd2MSGkOoGLRNK2yZhy514S9lKw8fnJgA9Y3EQuVfKGtS6VxAstWrJ5GQAJdlTIh9g
         z560ZDhYSzd2lIGkzUWt6Hu6fM1P/jDL3cXH9EyDwHIIqG5+B93j4MaerKKtB4UxHEhK
         Ulfg==
X-Received: by 10.224.53.198 with SMTP id n6mr2679748qag.2.1369865930627;
        Wed, 29 May 2013 15:18:50 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.5.8 with SMTP id o8ls115932qeo.24.gmail; Wed, 29 May 2013
 15:18:49 -0700 (PDT)
X-Received: by 10.49.28.35 with SMTP id y3mr5321130qeg.7.1369865929595;
        Wed, 29 May 2013 15:18:49 -0700 (PDT)
Original-Received: from mail-qc0-x231.google.com (mail-qc0-x231.google.com [2607:f8b0:400d:c01::231])
        by mx.google.com with ESMTPS id e17si13740432qct.127.2013.05.29.15.18.48
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 29 May 2013 15:18:48 -0700 (PDT)
Received-SPF: pass (google.com: domain of crowl@google.com designates 2607:f8b0:400d:c01::231 as permitted sender) client-ip=2607:f8b0:400d:c01::231;
Original-Received: by mail-qc0-f177.google.com with SMTP id e1so4989778qcy.8
        for <std-proposals@isocpp.org>; Wed, 29 May 2013 15:18:48 -0700 (PDT)
X-Received: by 10.49.34.130 with SMTP id z2mr5291595qei.25.1369865928315; Wed,
 29 May 2013 15:18:48 -0700 (PDT)
Original-Received: by 10.229.1.196 with HTTP; Wed, 29 May 2013 15:18:48 -0700 (PDT)
In-Reply-To: <CAOSC0-X=oaikYRbDAY+wf0XZgt8mYre=0aOD9AD4mnYcPyVQRg@mail.gmail.com>
X-Gm-Message-State: ALoCoQkXg1s5rcFRQOAyYTKeVUFuMqyNqcTDSWu9LL57bcw0zlarMxkJOWHB2uUo4/HbtjF/rbkT3tI7g0x5TaDWEek0AzHx10rnp6DjjfrD6iy1ilTRRpH9U1Li84nMtTm4ochB5+ny1kz180wfCVV6mtS9sxT+vvbSGp9wa9UyoZbMt44aaFh2brpe4//DPT93hhHeVHje
X-Original-Sender: crowl@googlers.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of crowl@google.com designates 2607:f8b0:400d:c01::231 as permitted
 sender) smtp.mail=crowl@google.com;       dkim=pass header.i=@googlers.com;
       dmarc=pass (p=QUARANTINE dis=none) d=googlers.com
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?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:4736
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/4736>

On 5/29/13, adrien courdavault <adrien59cadri@gmail.com> wrote:
> Clearly a static info would be great if possible, that is why i said a
> trait
> I don't have a clear list in mind, but any "status" function like
> future::valid I would like to have this feature
> also, It could be interesting on some containers in general or
> allocators (like allocators). But this could also be done by choosing
> policies (the problem could then be that some policies are not
> implemented). I looked at the lockfree lib of boost recently, it is
> nice but not so clear to use.
>
> In general that could be useful for anything which depending on the
> implementation should or may be lock free or not.
> Also then comes the issue of lock free vs wait free ...
>
> I don't know really what is best but I really miss a feature that
> could be used to say this is ok, this is not.
>
> Finally the problem with compile time would be for dlls.. maybe having
> a way to get this compile time info at runtime would be nice, so it
> would work with dll/so too.
>
> I know this is not really clear

It would be helpful if you could write a paper, presenting your
examples and including a list of functions for which you really
need the answer.

>
> On 29 May 2013 21:24, Lawrence Crowl <crowl@googlers.com> wrote:
>> On 5/29/13, adrien courdavault <adrien59cadri@gmail.com> wrote:
>>> This seams to be a very simplistic request but I think it would be
>>> nice to have some traits to know if a function call is lock free
>>> or not.  It is not usefull for every function, but it could be
>>> for the class like thread obviously.  Clearly launching a thread
>>> is not, but depending on the implementation get_id could be;
>>>
>>> I say that because in time critical thread you want to know it
>>> it is safe to do that.  In my case i want to know if I am in the
>>> time critical thread, ... problem, if asking for the id of the
>>> thread is not lock free I might just have break the rule I wanted
>>> to inforce by asking if I was in this thread, what do you think?
>>
>> We might be able to provide this query definitively for a
>> pre-determined set of functions.  In general, though, I think we
>> would need to be able to answer "don't know".
>>
>> Do you have a list of other functions for which you must know?
>> Do you need a dynamic test, i.e. on a function pointer, or can
>> you live with a static test, i.e. on a template argument?
>>
>> --
>> Lawrence Crowl
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/2iCzaKc2PRE/unsubscribe?hl=en.
>> To unsubscribe from this group and all its topics, 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/?hl=en.
>>
>>
>
> --
>
> ---
> 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/?hl=en.
>
>
>


-- 
Lawrence Crowl

-- 

--- 
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/?hl=en.



.
