24 template <
typename Function,
typename... Args>
25 explicit thread(Function&& f, Args&&... args) : std::
thread(&
thread::threadFunctionWrapper<Function, Args...>, this,
26 std::forward<Function>(f), std::forward<Args>(args)...) {
41 std::shared_ptr<Segment> s = threadRevision->current;
42 while (s != threadRevision->root) {
43 for (
auto v: s->written) {
49 threadRevision->current->Release();
56 using std::thread::get_id;
64 std::shared_ptr<Revision> threadRevision;
71 template <
class Function,
class... Args>
72 static void threadFunctionWrapper(
thread*
self, Function&& f, Args&&... args) {
75 std::invoke(std::forward<Function>(f), std::forward<Args>(args)...);
static thread_local std::shared_ptr< Revision > currentRevision
The current Revision for current thread.
std::thread wrapper with additional logic for managing Revisions
thread(Function &&f, Args &&... args)
Construcs thread and creates new Revision for it.
void join()
Joins thread and it's Revision.
Implementation of the class Revision.
Implementation of the class Segment.