You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use of C++11 concurrency library instead of pthreads. #45
To allow for more portable code, would it be feasible to replace the use of pthreads with the new C++11 concurrency library? It could be enabled when configured to build with cpp0x support (which at this point should be renamed to cpp11). What are your thoughts?
It seems a very good idea to me. The only reason I am not using C++11 right now on the library is to allow backward compatibility.
A good way to do so, and avoid to pollute the code with a big number of ifdef constructs would be to wrap the pthreads functionalities currently in use in the library in an isolated API and to implement there the preprocessor logic that makes use of the concurrency library when the cpp11 option is passed.
Thank you for sharing the idea.
Meanwhile C++11 is required and C++14 is recommended for libhttpserver. Can you reconsider this issue?
(Just stumbled over a pthread_mutex_init() in the code and was surprised because there's platform independent thread and mutex support from C++11 onwards.)
This issue was raised at a time when the library wasn't even C++11 compatible (outside for custom build flags). I think it does make sense at this point to move to a C++ native implementation.
Activity
etr commentedon Mar 6, 2014
It seems a very good idea to me. The only reason I am not using C++11 right now on the library is to allow backward compatibility.
A good way to do so, and avoid to pollute the code with a big number of ifdef constructs would be to wrap the pthreads functionalities currently in use in the library in an isolated API and to implement there the preprocessor logic that makes use of the concurrency library when the cpp11 option is passed.
Thank you for sharing the idea.
etr commentedon Mar 8, 2014
continue this discussion on issue #46
LeSpocky commentedon Nov 17, 2021
Meanwhile C++11 is required and C++14 is recommended for libhttpserver. Can you reconsider this issue?
(Just stumbled over a
pthread_mutex_init()in the code and was surprised because there's platform independent thread and mutex support from C++11 onwards.)etr commentedon Nov 17, 2021
This issue was raised at a time when the library wasn't even C++11 compatible (outside for custom build flags). I think it does make sense at this point to move to a C++ native implementation.
TASK-051 Tier 3: address 2nd-pass review findings (fix/task-051-2nd-r…