MCPcopy Create free account
hub / github.com/chen3feng/toft / WriteStep

Method WriteStep

container/skiplist_test.cpp:235–241  ·  view source on GitHub ↗

REQUIRES: External synchronization

Source from the content-addressed store, hash-verified

233
234 // REQUIRES: External synchronization
235 void WriteStep(Random* rnd) {
236 const uint32_t k = rnd->Next() % K;
237 const intptr_t g = current_.Get(k) + 1;
238 const Key key = MakeKey(k, g);
239 list_.Insert(key);
240 current_.Set(k, g);
241 }
242
243 void ReadStep(Random* rnd) {
244 // Remember the initial committed state of the skiplist.

Callers 1

TESTFunction · 0.80

Calls 4

NextMethod · 0.45
GetMethod · 0.45
InsertMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected