home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 32,188 of 33,346   
   =?ISO-8859-1?Q?Daniel_Kr=FCgler?= to M J   
   Re: C++'s new threading model...compatib   
   24 Apr 12 01:07:29   
   
   99901f55   
   From: daniel.kruegler@googlemail.com   
      
   On 2012-04-24 06:23, M J wrote:   
   > On 23 Apr., 16:47, Pete Becker  wrote:   
   >> On 2012-04-23 17:37:46 +0000, nroberts said:   
   >>   
   >>> To take advantage of C++'s new threading stuff (the memory model and   
   >   
   > [...]   
   >> once functions   
   >   
   > What are once functions?   
      
   There exists a library-provided template call_once, that takes a   
   callable object and an optional list of arguments to invoke that callable:   
      
   template   
   void call_once(once_flag& flag, Callable&& func, Args&&... args);   
      
   It guarantees that independent on how often you call call_once, it will   
   ensure that it calls the callable object once per provided once_flag.   
      
   HTH & Greetings from Bremen,   
      
   Daniel Krügler   
      
      
   --   
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca