You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "James E. King III (JIRA)" <ji...@apache.org> on 2019/01/05 06:56:00 UTC

[jira] [Updated] (THRIFT-4514) Remove pthread library support and use std::thread or boost::thread

     [ https://issues.apache.org/jira/browse/THRIFT-4514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James E. King III updated THRIFT-4514:
--------------------------------------
    Description: 
We have a pretty awful thread class implementation:

1. The build system compiles in the right files to implement the class definition.
 2. We support three thread libraries.

I want to simplify this, tremendously, to:

A. Remove the pthread implementation.
 B. Remove the boost thread implementation.
 C. Rename the std thread implementation (StdThreadFactory) to ThreadFactory
 D. Have one thread class implementation!
 E. Remove the WITH_STDTHREADS build time option as it will no longer be necessary.

In short:
 * Support std::thread for C++11 or later
 * Drop support for boost threads
 * Drop support for native pthreads

We have a lot of branches and test conditionals that do special things with different thread implementations. We need to simplify and move forward to reduce the maintenance cost in this area.

Any objections?

  was:
We have a pretty awful thread class implementation:

1. The build system compiles in the right files to implement the class definition.
 2. We support three thread libraries.

I want to simplify this, tremendously, to:

A. Remove the pthread implementation.
 B. Dynamically select the thread class the same way we select which smart_ptr to use (in stdcxx, if you're curious).
 C. Have one thread class implementation.
 D. Remove the WITH_STDTHREADS build time option as it will no longer be necessary.
 E. Continue to allow someone to force use of boost threads even in C++11 if they really want to.

In short:
 * Support std::thread for C++11 or later, unless overridden to use boost
 * Support boost::thread for C++98
 * Drop support for native pthreads

We have a lot of branches and test conditionals that do special things with different thread implementations. We need to simplify and move forward to reduce the maintenance cost in this area.

Any objections?


> Remove pthread library support and use std::thread or boost::thread
> -------------------------------------------------------------------
>
>                 Key: THRIFT-4514
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4514
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Library
>    Affects Versions: 0.11.0
>            Reporter: James E. King III
>            Assignee: James E. King III
>            Priority: Major
>
> We have a pretty awful thread class implementation:
> 1. The build system compiles in the right files to implement the class definition.
>  2. We support three thread libraries.
> I want to simplify this, tremendously, to:
> A. Remove the pthread implementation.
>  B. Remove the boost thread implementation.
>  C. Rename the std thread implementation (StdThreadFactory) to ThreadFactory
>  D. Have one thread class implementation!
>  E. Remove the WITH_STDTHREADS build time option as it will no longer be necessary.
> In short:
>  * Support std::thread for C++11 or later
>  * Drop support for boost threads
>  * Drop support for native pthreads
> We have a lot of branches and test conditionals that do special things with different thread implementations. We need to simplify and move forward to reduce the maintenance cost in this area.
> Any objections?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)