void remove(const K& key, V *valptr) { Mutex::Locker l(lock); typename map<K, pair<WeakVPtr, V*>, C>::iterator i = weak_refs.find(key); if (i != weak_refs.end() && i->second.second == valptr) { weak_refs.erase(i); } cond.Signal(); }
void TriggerCommand() { assert(mutex.IsLockedByCurrent()); #ifdef HAVE_POSIX cond.Signal(); #else command_trigger.Signal(); #endif }
void TriggerDone() { assert(mutex.IsLockedByCurrent()); #ifdef HAVE_POSIX cond.Signal(); #else done_trigger.Signal(); #endif }
void remove(const K& key) { Mutex::Locker l(lock); weak_refs.erase(key); cond.Signal(); }