D26126: Simplify param method: Return Early, Use a Map and Assert.

Kevin Ottens noreply at phabricator.kde.org
Mon Dec 23 16:37:36 GMT 2019


ervin added a comment.


  In D26126#581831 <https://phabricator.kde.org/D26126#581831>, @tcanabrava wrote:
  
  > static will add a Mutex in the generated assembly (as static variables in c++ are now thread safe) and I'm not sure this is a good thing for const - reading variables. I'll try another approach so we only initialize it once.
  
  
  Thread safe doesn't necessarily mean there will be a mutex... Depends if it's a literal type or not for a start, also it's generally implemented using the double locking pattern with atomics so if there's a mutex it's likely to be involved only one time on first call of the function.

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D26126

To: tcanabrava
Cc: ervin, GB_2, apol, kde-frameworks-devel, LeGast00n, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191223/4f14b68e/attachment.html>


More information about the Kde-frameworks-devel mailing list