Concurrent programming, lock-free multithreading
-
Imaging what i have 2 core processor. One core receive incoming connection and call function from other core for handle it connection. Requirements:
- First core never wait Second core
- First core must get result of called function from Second core, when it finished
- First core must restore local variables (stack frame) what be used when call function from Second core (like in Closures)
How I can do this with Qt?
-
From my point of view QFuture and QFutureWathcer will help you.
-
here is a choice link ( though link examples in java) you can take ur pick from it most likely and transform to Qt http://www.vogella.de/articles/JavaConcurrency/article.html
-
Here is a good starting point for this kind of problem; http://doc.qt.nokia.com/latest/threads-qtconcurrent.html