qt - slots and signals for multithreading -


i have job in pthread prepares data set plotting. need display data in main window graph. how can transfer data set form thread rendering widget in main window.

i use slots , signals. happens when thread emits signal more slot receive it.

the problem use qmap* transfer data set form 1 thread another. , need confident slot finished job , can update map in job thread.

firstly, assume mean have job in 'qthread', not pthread (as in posix thread). in case, you're right use signals , slots pass data main thread rendering.

how frequent 'more slot receive it'? have tried , having problems, or speculating think may go wrong? if having problem sending many signals, batch data on processing thread , send batch periodically on timer.

as ensuring slot has finished job, can use qmutex control access qmap in each thread. qt qmutex explains usage; lock mutex, work , unlock.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -