Parallel Processing in Qt
-
Hi All,
How is parallel processing achieved in Qt. Suppose i need to call two functions which performs serial communication with multiple serial devices connected.Func_A() handles serial communication with Device 1 and Func_B() handles serial communication with Device 2 and so on, but both needs to be communicated in parallel and not sequential .
The motive is to communicate with multiple devices connected through serial/Ethernet at the same time.
Any Kind Guidance in this regard will be very helpful.
Thank You.
-
@Rajesh-Panati said in Parallel Processing in Qt:
but both needs to be communicated in parallel and not sequential .
What kind of data do you send that you think you need two threads for this? What do you mean with 'same time'?
See https://doc.qt.io/qt-5/thread-basics.html but for your task I don't see a need for it. Especially when you need to ask such basic stuff.
-
@Christian-Ehrlicher Thanks for your quick response. The GUI will send serial packet to the device for testing the peripherals through serial port and send the device sends back the test results back to GUI after a particular peripheral is tested. For your question what "Same time means", Suppose I have 10 mins to test 1 device. The application now works fine for testing a single device connected through serial. Now the intention is to test more than 30 devices in that same 10 mins.
-
I don't see why you need more than one thread in your case - simply create a QSerialDevice per device and work on them. It's all async by default.
-
@Christian-Ehrlicher Thank you for your response. i will check it