Results 1 to 2 of 2

Thread: Basic Event Loop Question

  1. #1
    Join Date
    Aug 2010
    Posts
    28
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1

    Default Basic Event Loop Question

    I think I'm sort of thinking myself in circles with threads, and serializing, etc.

    I have a basic gui program that will be monitoring Tcp connections for requests. I'm trying to pattern my program using slots/signals like the fortuneclient/server example.

    Are events in the event loop always serialized? So you can't be in two calls at the same time? So if the processor of the tcp data is only responding via an event, I don't have to worry about locking/unlocking?

    If the question seems confused, its not because of my english --- its me .

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Basic Event Loop Question

    Quote Originally Posted by qtYoda View Post
    Are events in the event loop always serialized?
    Yes.

    So if the processor of the tcp data is only responding via an event, I don't have to worry about locking/unlocking?
    If the objects are running within the same thread then you don't have to lock resources.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    qtYoda (14th March 2011)

Similar Threads

  1. Event loop
    By jefs in forum Qt Programming
    Replies: 2
    Last Post: 2nd January 2011, 18:51
  2. Replies: 10
    Last Post: 15th January 2010, 15:35
  3. Question about exiting event loop
    By billy61 in forum Qt Programming
    Replies: 1
    Last Post: 8th August 2009, 09:11
  4. Event Loop
    By node_ex in forum Qt Programming
    Replies: 1
    Last Post: 12th December 2008, 08:52
  5. Replies: 0
    Last Post: 23rd October 2008, 13:43

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.