MCPcopy Create free account
hub / github.com/apache/trafficserver / commit

Method commit

include/tscore/AcidPtr.h:120–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118 }
119
120 void
121 commit(T *data)
122 {
123 // wait until existing commits finish, avoid race conditions
124 auto commit_lock = AcidCommitLock(AcidCommitMutexGet(&data_ptr));
125 // wait until we have exclusive pointer access.
126 auto ptr_lock = AcidPtrLock(AcidPtrMutexGet(&data_ptr));
127 // overwrite the pointer
128 data_ptr.reset(data);
129 //[end scope] unlock commit_lock & ptr_lock
130 }
131
132 AcidCommitPtr<T>
133 startCommit()

Callers 1

saveMethod · 0.45

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected