Exemplo n.º 1
0
bool QueueOfRunnables::try_put(Runnable* runnable)
{
 assert(runnable!=NULL);
 MutexLocker guard(arrivedMutex_);
 if (full_()) {
   return false;
 }
 real_put_(runnable);
 return true;
}
Exemplo n.º 2
0
bool oskar_settings_utility_string_starts_with(const std::string& full_string,
                                               const std::string& fragment,
                                               bool case_senstive)
{
    std::string full_(full_string), frag_(fragment);
    if (case_senstive == false) {
        full_ = oskar_settings_utility_string_to_upper(full_string);
        frag_ = oskar_settings_utility_string_to_upper(fragment);
    }
    if (full_.find(frag_) == 0) return true;
    else return false;
}
Exemplo n.º 3
0
 bool suppliers_activate_() const
 { return active_ == false || ! full_(); }
Exemplo n.º 4
0
 bool full()
 {
   typename boost::mutex::scoped_lock lock( mtx_);
   return full_();
 }