[ 
https://issues.apache.org/jira/browse/MESOS-3046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14726907#comment-14726907
 ] 

Klaus Ma commented on MESOS-3046:
---------------------------------

I'd suggest to use static var in {{random()}} as  [~nekto0n] proposed, because
    1. The static member still need to be constructed in a CPP file in gcc 
4.8.4 (ubuntu 14.04); refer to the attachment for the example
    2. According to the description in 
[cppreference|http://en.cppreference.com/w/cpp/language/storage_duration], the 
static did not affect its thread storage duration

{quote}
5) The thread_local keyword is only allowed for objects declared at namespace 
scope, objects declared at block scope, and static data members. It indicates 
that the object has thread storage duration. It can be combined with static or 
extern to specify internal or external linkage (except for static data members 
which always have external linkage), respectively, but that additional static 
doesn't affect the storage duration. 
{quote}

> Stout's UUID re-seeds a new random generator during each call to UUID::random.
> ------------------------------------------------------------------------------
>
>                 Key: MESOS-3046
>                 URL: https://issues.apache.org/jira/browse/MESOS-3046
>             Project: Mesos
>          Issue Type: Bug
>          Components: stout
>            Reporter: Benjamin Mahler
>            Assignee: Klaus Ma
>              Labels: newbie, twitter
>
> Per [~StephanErb] and [~kevints]'s observations on MESOS-2940, stout's UUID 
> abstraction is re-seeding the random generator during each call to 
> {{UUID::random()}}, which is really expensive.
> This is confirmed in the perf graph from MESOS-2940.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to