Hi All,

I have an application that generates/obtain information information in the background, a pushed (signal) to a GUI and to a server class(inherits from QTCServer) which has the array of sockets(inherits from QTCPSocket)

The GUI live in the main thread.
The Server lives in working thread1 (everything is guard using mutex)
The Generation/acquiring information is in working thread2.

So the problem is i a deadlock.

Every single time there is information available, the server push it to all the clients connected to it.

The deadlock occur if the client send something to the server,
the socket(in the server side) is in the slotReadyRead reading the buffer.
and there some new information that needs to be send to the through the same sockets.
At this point the deadlock is present.

Is there some alternative?
is it really needed to have guards in socket class, thread-safe?
is it enough to guarantee that is re-entrant?
I assure that function in the socket is always called from the thread that creates it (thread1) using signal/slot.

Any help is appreciated.

CAFU