You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Benjamin Hindman (JIRA)" <ji...@apache.org> on 2015/07/25 01:50:04 UTC

[jira] [Comment Edited] (MESOS-3119) Remove pthread specific code from Libprocess

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

Benjamin Hindman edited comment on MESOS-3119 at 7/24/15 11:49 PM:
-------------------------------------------------------------------

Turns out we can't use {{thread_local}} with the default installed clang on OS X. See https://devforums.apple.com/message/1079348#1079348. Relevant snippet: "We don't support the thread_local implementation from the open-source Clang because we believe we can provide a higher-performance implementation for our platforms using various features in the dynamic linker. Such an implementation would be ABI-incompatible with the implementation in the open-source Clang, so we won't support thread_local until we get an implementation we can live with for the foreseeable future."

So, I've reopened this issue and reverted {{f24db46b92796efaa15766c625b8ef4706240f2f}} for now.

One possible path forward is to use {{__thread}} since it's supported by both clang and gcc (and we could introduce something similar for non-POSIX platforms), but we'd need to be careful because it has C style semantics, which means that we won't get object construction/destruction (which we would with {{thread_local}} IIUC). We currently don't need object construction/destruction in our code base, but I'd still prefer to wrap {{__thread}} in some sort of macro that makes it clear that we need to create _pointers_ when using {{__thread}}.


was (Author: benjaminhindman):
Turns out we can't use `thread_local` with the default installed clang on OS X. See https://devforums.apple.com/message/1079348#1079348. Relevant snippet: "We don't support the thread_local implementation from the open-source Clang because we believe we can provide a higher-performance implementation for our platforms using various features in the dynamic linker. Such an implementation would be ABI-incompatible with the implementation in the open-source Clang, so we won't support thread_local until we get an implementation we can live with for the foreseeable future."

So, I've reopened this issue and reverted `f24db46b92796efaa15766c625b8ef4706240f2f` for now.

One possible path forward is to use `__thread` since it's supported by both clang and gcc (and we could introduce something similar for non-POSIX platforms), but we'd need to be careful because it has C style semantics, which means that we won't get object construction/destruction (which we would with `thread_local` IIUC). We currently don't need object construction/destruction in our code base, but I'd still prefer to wrap __thread in some sort of macro that makes it clear that we need to create _pointers_ when using `__thread`.

> Remove pthread specific code from Libprocess
> --------------------------------------------
>
>                 Key: MESOS-3119
>                 URL: https://issues.apache.org/jira/browse/MESOS-3119
>             Project: Mesos
>          Issue Type: Improvement
>          Components: libprocess
>            Reporter: Joris Van Remoortere
>            Assignee: Joris Van Remoortere
>              Labels: libprocess, mesosphere, windows
>             Fix For: 0.24.0
>
>




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