void Pipe::_exitCommandQueue() { // Non-threaded pipes have no pipe thread message pump if( !_impl->thread ) return; CommandQueue* queue = _impl->thread->getWorkerQueue(); LBASSERT( queue ); MessagePump* pump = queue->getMessagePump(); queue->setMessagePump( 0 ); delete pump; }
void Pipe::_setupCommandQueue() { LBINFO << "Set up pipe message pump for " << _impl->windowSystem << std::endl; Config* config = getConfig(); config->setupMessagePump( this ); if( !_impl->thread ) // Non-threaded pipes have no pipe thread message pump return; CommandQueue* queue = _impl->thread->getWorkerQueue(); LBASSERT( queue ); LBASSERT( !queue->getMessagePump( )); Global::enterCarbon(); MessagePump* pump = createMessagePump(); if( pump ) pump->dispatchAll(); // initializes _impl->receiverQueue queue->setMessagePump( pump ); Global::leaveCarbon(); }