[Paraview] troubles with pipeline asynchronous update
Nadir Raimondo
raimondo at ismb.it
Wed Feb 8 04:21:51 EST 2012
Hi John,
thanks for your answer. Because I'm a newby I'd like to know more about
the example:
TcpNotificationSocket is a QTcpSocket?
From the code, it seems that it is used only to send a signal to a slot
to execute the pipeline update in the paraview gui thread (in fact, the
socket is closed immediatly).
Is this correct or is the socket used for "real" client/server
communications?
Is it possible to use something similar for sending the signal from a
thread using Qt::BlockingQueuedConnection?
Best regards,
Nadir
On 02/07/2012 05:35 PM, Biddiscombe, John A. wrote:
> Probably not safe, you need to update the pipeline on the main paraview gui thread
>
> if (this->Internals->TcpNotificationSocket) {
> this->connect(this->Internals->TcpNotificationSocket,
> SIGNAL(readyRead()), SLOT(onNotified()), Qt::QueuedConnection);
> this->Internals->TcpNotificationServer->close();
> }
>
> Note use of Qt::QueuedConnection - in the panel/other handler you can then call update. This should ensure that you don't call update inside a thread whilst paraview is doing an update already somewhere else.
>
> JB
More information about the ParaView
mailing list