MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TryDeregisterCallback

Method TryDeregisterCallback

tensorflow/core/framework/cancellation.cc:92–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92bool CancellationManager::TryDeregisterCallback(CancellationToken token) {
93 mutex_lock lock(mu_);
94 if (is_cancelled_ || is_cancelling_) {
95 return false;
96 } else {
97 callbacks_.erase(token);
98 return true;
99 }
100}
101
102CancellationManager::~CancellationManager() {
103 if (!callbacks_.empty()) {

Callers 3

RecvAsyncMethod · 0.80
TESTFunction · 0.80
RegisterCallMethod · 0.80

Calls 1

eraseMethod · 0.45

Tested by 1

TESTFunction · 0.64