Exemplo n.º 1
0
void Buffer::Decoder::end()
{
    requestInterruption();
    if (!wait(2000))
    {
        terminate();
    }

    wait();
}
Exemplo n.º 2
0
/* Kill this thread */
void Player::kill()
{
    requestInterruption();

    /* Fake a cmd, to leave properly */
    mutex.lock();
    queue.clear();
    mutex.unlock();
    cmdAvailable.release(1);
}
Exemplo n.º 3
0
pf_mcontroller::~pf_mcontroller()
{
    //finish the thread
    requestInterruption();
    if(!wait(3000))
    {
        QDebug(QtWarningMsg) << "Can't quit thread, terminate";
        terminate();
        wait();
    }
    QDebug(QtDebugMsg) << "THread is terminated";
    //delete serial ports instances
    if(m_tx_port == m_rx_port)
    {
        delete m_tx_port;
    }
    else
    {
        delete m_tx_port;
        delete m_rx_port;
    }
}
Exemplo n.º 4
0
 inline void stop()
 {
     requestInterruption();
 }