MCPcopy Create free account
hub / github.com/ParAlg/gbbs / clear

Method clear

pbbslib/concurrent_stack.h:127–131  ·  view source on GitHub ↗

assumes no push or pop in progress

Source from the content-addressed store, hash-verified

125
126 // assumes no push or pop in progress
127 void clear() {
128 Node* x;
129 while ((x = a.pop())) free(x);
130 while ((x = b.pop())) free(x);
131 }
132
133 concurrent_stack() {}
134 ~concurrent_stack() { clear(); }

Callers

nothing calls this directly

Calls 1

popMethod · 0.45

Tested by

no test coverage detected