thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (THRIFT-1361) Optional replacement of pthread by boost::thread
Date Sun, 06 Nov 2011 12:36:51 GMT

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

Hudson commented on THRIFT-1361:
--------------------------------

Integrated in Thrift #320 (See [https://builds.apache.org/job/Thrift/320/])
    THRIFT-1361 revert compiler/cpp/src/thrifty.yy change
=> breaks mingw build
=> memleak fixes reported by cppcheck

roger : http://svn.apache.org/viewvc/?view=rev&rev=1198347
Files : 
* /thrift/trunk/compiler/cpp/src/thrifty.yy
* /thrift/trunk/lib/cpp/src/transport/TFileTransport.cpp
* /thrift/trunk/lib/cpp/test/TransportTest.cpp

                
> Optional replacement of pthread by boost::thread
> ------------------------------------------------
>
>                 Key: THRIFT-1361
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1361
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Library
>    Affects Versions: 0.8
>         Environment: Linux and Windows
>            Reporter: alexandre parenteau
>            Assignee: alexandre parenteau
>            Priority: Minor
>              Labels: patch
>             Fix For: 0.8
>
>         Attachments: THRIFT-1361-configure.ac.patch, THRIFT-1361-rev2.patch, THRIFT-1361-rev3.patch,
THRIFT-1361.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> What it is:
> * an experimental alternative to using pthread in Thrift, by using boost::thread and
boost::interprocess instead (--enable-boostthreads)
> * a way for thrift clients already depending on boost::thread to blend better with thrift
> * a solution to the Windows problem of having to link with ASF incompatible license of
pthread_win32 (GPL), add more servers and transports to WIN32 (pooled, file, pipe...), and
allow for a 64bits WIN32. See THRIFT-1031 for details.
> What it is NOT:
> * a replacement for the POSIX thread version of thrift: the POSIX pthread version has
more features, and is probably more stable/mature. This feature is turned off by default by
configure
> * a mature code: it has been really lightly tested, and is aimed primarily at the WIN32
platform
> New dependencies:
> * if --enable-boostthreads is provided, libthrift.so will link with shared libboost_thread.so
(cannot work with libboost_thread.a AFAIK). This forces in effect Thrift to use a version
of boost compiled with "./bjam link=shared"
> Bugs/Testing:
> * ./TestServer --server-type=thread-pool: PASS
> * ./TestServer --server-type=threaded: PASS
> * TFileTransportTest::test_destructor: FAILS: could not tell whether this is because
I'm using a slow (virtual) machine (as pointed by the test comment)
> * Tested on Ubuntu/Windows, boost 1.44, libevent 2.0.14: however did not change the vc10
project files, because of potential conflict with on going THRIFT-1031
>  * It is now possible to include more servers/transports to Win32, and also remove all
pthread_win32 dependencies
> Related JIRA:
> * THRIFT-1031: Windows port
> Side notes:
> * there are minor corrections inside PosixThreadFactory for all platforms ("started"
vs "starting"...), so that Win32 port also works with pthread_win32
> * TFileTransport has been enhanced to use the existing Mutex and Monitor abstractions
> * a minor fix in TSocket.cpp prevents verbose error, WIN32 only
> * minor enhancement by using WSAPoll if available, WIN32 only
> * on msvc10 and boost 1.44, there is a problem deep inside boost::interprocess: boost/interprocess/detail/move.hpp
needs to be patched:
> {code}
> index 31d108f..42aa227 100644
> --- a/boost/interprocess/detail/move.hpp
> +++ b/boost/interprocess/detail/move.hpp
> @@ -339,7 +339,7 @@ rvalue_reference move (input_reference);
>  #else
>  template <class T> inline
>  typename remove_reference<T>::type&& move(T&& t)
> -{  return t;   }
> +{  return static_cast<typename remove_reference<T>::type &&>(t);
  }
>  #endif
> {code}
> Please let me know of any questions, testing help appreciated (./configure --enable-boostthreads).
This is an important change for our company, to get a Windows port of Thrift more on par with
Linux features.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message