Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Parallel Processing in Qt
Forum Updated to NodeBB v4.3 + New Features

Parallel Processing in Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 751 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rajesh Panati
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      R 1 Reply Last reply
      2
      • Christian EhrlicherC Christian Ehrlicher

        @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.

        R Offline
        R Offline
        Rajesh Panati
        wrote on last edited by
        #3

        @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.

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          R 1 Reply Last reply
          3
          • Christian EhrlicherC Christian Ehrlicher

            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.

            R Offline
            R Offline
            Rajesh Panati
            wrote on last edited by
            #5

            @Christian-Ehrlicher Thank you for your response. i will check it

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved