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. Will qtimers slots conflict happen?
Forum Updated to NodeBB v4.3 + New Features

Will qtimers slots conflict happen?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 985 Views 1 Watching
  • 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.
  • S Offline
    S Offline
    SpartaWHY117
    wrote on last edited by
    #1

    If we have multiple timers in a single thread console application. For example one timer set interval is 3s, another time set 5 second and they maybe not started at the same time. In timerA slots, we change variable value or do some other things, before done all the things in the slots, it's right time to call slots of timerB . In this situation, timerA some operations can't be done before timerB slots start. The operations in timerA's slots is important to timerB.

    So how to avoid this situation happen? or there is other alternative method to solve this problem?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      So you have a slower timer depending on stuff done by a faster timer but both are not started at the same time, correct ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      S 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        So you have a slower timer depending on stuff done by a faster timer but both are not started at the same time, correct ?

        S Offline
        S Offline
        SpartaWHY117
        wrote on last edited by
        #3

        @SGaist YES. but after some time thinking, i think i find the answer. The work will be done sequentially because they are in the event queue, so they will be handled one by one? is this correct?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          The download will also happen asynchronously.

          Is it me or are you preparing an architecture that might work based on an internal technical detail ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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