void make_image(Gtk::Image& image) { boost::lock_guard<boost::mutex> scoped_lock(predata_mutex_); auto pixbuf = Gdk::Pixbuf::create_from_data( &data_[0], Gdk::COLORSPACE_RGB, has_alpha_, 8 /*bits per sample*/, dims_.width(), dims_.height(), rowstride_ ); image.set(pixbuf); boost::lock_guard<boost::mutex> scoped_lock2(barrier_mutex_); barrier_->wait(); }
void EventChannel::cleanUpChannel() { boost::mutex::scoped_lock scoped_lock(mOutgoingMutex); while(!mOutgoingQ.empty()) { BaseEventPool* pool = mOutgoingQ.front(); EventManager::getInstance()->freePool(pool); mOutgoingQ.pop(); } boost::mutex::scoped_lock scoped_lock2(mIncomingMutex); while(!mIncomingQ.empty()) { BaseEventPool* pool = mIncomingQ.front(); EventManager::getInstance()->freePool(pool); mIncomingQ.pop(); } }