Beispiel #1
0
 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();
 }
Beispiel #2
0
    void TriggerCommand() {
        assert(mutex.IsLockedByCurrent());

#ifdef HAVE_POSIX
        cond.Signal();
#else
        command_trigger.Signal();
#endif
    }
Beispiel #3
0
    void TriggerDone() {
        assert(mutex.IsLockedByCurrent());

#ifdef HAVE_POSIX
        cond.Signal();
#else
        done_trigger.Signal();
#endif
    }
Beispiel #4
0
 void remove(const K& key) {
   Mutex::Locker l(lock);
   weak_refs.erase(key);
   cond.Signal();
 }