MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / clear

Method clear

nodedb-cluster/src/swim/dissemination/queue.rs:55–60  ·  view source on GitHub ↗

Drop every rumour. Used by tests and on shutdown.

(&self)

Source from the content-addressed store, hash-verified

53
54 /// Drop every rumour. Used by tests and on shutdown.
55 pub fn clear(&self) {
56 self.inner
57 .lock()
58 .expect("dissemination lock poisoned")
59 .clear();
60 }
61
62 /// Return up to `max` least-disseminated updates for a single
63 /// outgoing message. Increments each returned entry's `sent_count`

Callers 10

takeMethod · 0.45
takeMethod · 0.45
apply_enqueuesFunction · 0.45
clear_empties_queueFunction · 0.45
superstepMethod · 0.45
advanceMethod · 0.45
takeMethod · 0.45

Calls 2

lockMethod · 0.80
expectMethod · 0.45

Tested by 6

apply_enqueuesFunction · 0.36
clear_empties_queueFunction · 0.36
takeMethod · 0.36