impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Armstrong <tarmstr...@cloudera.com>
Subject Re: thread_local compatible with other threading models?
Date Wed, 15 Nov 2017 18:06:04 GMT
Pretty sure that boost::thread uses pthreads under the covers, so I think
the question is whether thread_local works with the lowest common
denoninator pthreads.

It sounds like thread_local uses an older mechanism __thread under the
covers that
https://sourceware.org/glibc/wiki/Destructor%20support%20for%20thread_local%20variables
but that there is some special handling for destructors. My guess is that
that will work with pthreads but we could check experimentally.

On Tue, Nov 14, 2017 at 9:21 AM, Jim Apple <jbapple@cloudera.com> wrote:

> A quick git grep shows use of both boost::thread and pthread. C++14 has a
> thread_local keyword:
>
> http://eel.is/c++draft/basic.stc.thread
>
> Do we know if the semantics of thread_local in C++14 are compatible with
> thread-locality in pthreads and boost::thread?
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message