[SOLVED] Will QtConcurrent:run work on a single core Linux target?



  • Hi,

    I was wondering, will QtConcurrent:run work (if I can get it to compile) on a single core Linux OS target? I wanted to kick off playing videos (which are controlled outside of the Qt paradigm) and not wait to render the Qt elements on the screen. But before I invest time into this, I wanted to know what type of performance improvements I might expect.

    -thanks



  • QtConcurrent does work on single-core systems as well, but you'd better understand that there can't be any performance improvements (exceptions prove the rule). Multithreaded applications do perform better because different code paths can be executed simultaneously, which requires more than one physical core by definition. Quite contrary to, multithreaded applications might (not mandatory) perform even slightly worse on single-core platforms, as there is additional overhead due to context switch.

    However, in the majority of cases it does make well sense to create multithreaded applications for single-core systems, as it will improve the responsivness (the GUI thread is not blocked by other tasks) and applications do scale more or less automatically when deployed to n-core systems later on.



  • That's what I thought. Just wanted to make sure before I went to the trouble of trying my hand at it.

    Speaking of that, here's my other thread where I'm trying to get the syntax figured out:
    http://developer.qt.nokia.com/forums/viewthread/13729/#72211

    -thanks


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.