PDA

View Full Version : Basic Event Loop Question



qtYoda
13th March 2011, 21:22
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 :o.

wysota
13th March 2011, 22:31
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.