MCPcopy Create free account
hub / github.com/comnik/declarative-dataflow / uninterest

Method uninterest

src/server/mod.rs:491–504  ·  view source on GitHub ↗

Handles an Uninterest request, possibly cleaning up dataflows that are no longer interesting to any client.

(&mut self, client: Token, name: &str)

Source from the content-addressed store, hash-verified

489 /// Handles an Uninterest request, possibly cleaning up dataflows
490 /// that are no longer interesting to any client.
491 pub fn uninterest(&mut self, client: Token, name: &str) -> Result<(), Error> {
492 // All workers keep track of every client's interests, s.t. they
493 // know when to clean up unused dataflows.
494 if let Some(entry) = self.interests.get_mut(name) {
495 entry.remove(&client);
496
497 if entry.is_empty() {
498 self.shutdown_query(name);
499 self.interests.remove(name);
500 }
501 }
502
503 Ok(())
504 }
505
506 /// Cleans up all bookkeeping state for the specified client.
507 pub fn disconnect_client(&mut self, client: Token) -> Result<(), Error> {

Callers 2

disconnect_clientMethod · 0.80
mainFunction · 0.80

Calls 1

shutdown_queryMethod · 0.80

Tested by

no test coverage detected