Ignore:
Timestamp:
03/27/14 12:53:43 (10 years ago)
Author:
Marek Kurdej
Message:

Reworked threading in InputInterfaceBase, each slot has its own processing thread.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/ProducerConsumerExample/ConsumerExample.cpp

    r288 r291  
    1717    LOG_TRACE("constructor(" << name << ")");
    1818
    19     LOG_INFO("Thread " << thread.currentThread());
    20     LOG_INFO("Current Thread " << QThread::currentThread());
    21 
    22     namespace po = boost::program_options;
    2319    addParameters()
    24         ("output-path", po::value<std::string>(&mOutputFileName)->default_value("consumer.txt"), "set output file path")
     20        ("output-path", value<std::string>(&mOutputFileName)->default_value("consumer.txt"), "set output file path")
    2521    ;
    2622}
     
    5551{
    5652    LOG_TRACE(Q_FUNC_INFO);
    57     moveToThread(&thread);
    5853    m_counter = 0;
    5954   
     
    6358    }
    6459
    65     thread.start();
    6660    setState(MONITOR_OK);
    6761    LOG_INFO("started component '" << getName() << "'");
     
    7266    LOG_TRACE(Q_FUNC_INFO);
    7367
    74     QMetaObject::invokeMethod(&thread, "quit");
    7568    m_file.close();
    7669    setState(STOPPED);
     
    9790   
    9891    PacpusTypedEvent<int> intEvent(TYPED_EVENT, 2);
    99     //PacpusTypedEvent<QImage> imageEvent = intEvent;
     92    //PacpusTypedEvent<QImage> imageEvent = intEvent; // should not compile
    10093}
Note: See TracChangeset for help on using the changeset viewer.