Roadmap: Support for C++11 #1103
Labels
[core]
Area: Changes in SRT library core
Priority: Medium
Type: Enhancement
Indicates new feature requests
Milestone
Support for C++11 mutexes, CVs and threads is planned for v1.5.0 release.
Due to the concurrent work on network bonding functionality, the initial feature PR #800 has to be split into very small pieces. This ticket keeps track of the current progress.
Timing wrappers (PR Introducing steady clock to all timers #929). With C++11 the
chrono
library has to be used for timing. Therefore, no direct calls to timing functions can exist in the code.sync::steady_clock
wrapper for pthreads version is created. In case of C++11 it can by directly mapped to thechrono::steady_clock
class.Mutex wrapper class (PR Introducing sync Mutex wrapper class #1064) to switch between pthread and C++11 implementations.
CV waiting functions (PR Introducing sync Mutex wrapper class #1064). Waiting on a CV has to be wrapped into some function to allow switching between C++11 and pthread versions.
To avoid merge conflicts with the network bonding branch, the
CSync
wrapper was added as an intermediate step (PR Added CSync class as high level CV wrapper #1067). For the moment it allows to simplify merging due to this class was already added in that branch. It is to be replaced byCEvent
andCTimer
classes.Condition variable wrapper (PR [core] Added CCondVar #1102)
CEvent
class to hold both mutex and CV. To gradually replaceCSync
in further changes. PR [core] Introducing sync::CEvent #1149Implementation of
CTimer
based onCEvent
. PR [core] Replaced CTimer with new CTimer #1174.Monotonic clock to be used in all sync events when enabled. PR [core] Replaced CTimer with new CTimer #1174.
Add C++11 build option internaly to check C++11 sync objects. PR [core] Minor adjustments for sync timing compliance #1269, PR Adding SRT build option for building with C++11 chrono and threads #1266
Add thread wrappers for C++11. PR C++11 Threads Part 7: Added CThread Wrapper #1225.
Add C++11 thread local storage. PR [core] Thread-local error for C++11 and pthreads #1244.
Introduce C++11 build option. PR Adding SRT build option for building with C++11 chrono and threads #1266 PR [core] Fixed C++11 build (win) #1281
Update docs regarding building procedure. PR [docs] Updated Windows build instructions #1312
CI pipeline for C++11 builds: Win, Linux, Mac. PR [build] Fixed Linux build with STDCXX SYNC enabled #1445.
PR Build/cxx11 gihub action #1305. Windows CI C++11 build without OpenSSL and pthreads
Replace
CGuard
withUniqueLock
andScopedLock
. PR [core] Replaced CGuard with corresponding lock: UniqueLock or ScopedLock #1418.pthread_cond_wait() can report an error. The wrapper ignores it. Throw an exception similar to C++11 condition_variable. See this comment: link. Issue Handle error from pthread_cond_wait() #1574.
GetThreadLocalError() leads to lazy allocation through calling
new
operator, which potentially may cause unhandledstd::bad_alloc
exception thrown out of the call ofsrt_getlasterror()
- see Thrown bad_alloc unhandled during lazy allocation of an application durable thread local error object #915The text was updated successfully, but these errors were encountered: