Hi,
I’m using QTango as GUI for my tango servers. And one of my tango servers performs a long running command (converting data from format A to format B). This triggers the default timeout of three seconds and results in a popup in the GUI.
Now I can of course hack that to work as in
--- a/gui/qtango/trunk/qtangocore/src/taction.cpp
+++ b/gui/qtango/trunk/qtangocore/src/taction.cpp
@@ -451,6 +451,11 @@ TVariant& TAction::execute(QVariant v, bool push)
}
else if(d_type == COMMAND)
{
+ // @todo HACK! increase the timeout to 5 minutes, required for device
+ // servers like XXX
+ // need to make this configurable via properties like startDSPath of TangoStarter
+ d_device->set_timeout_millis(1000 * 60 * 5);
+
/* no need to lock d_cmdInfo, d_argin, d_stdPoint: they are not concurrently modified */
if(v.isNull())
{
but this is kind of ugly. Is there a better fix for that which I missed?
An additional problem with this long running command is that other GUI controls referencing the same device server, for example the Status command/attribute, don’t get updated and fail with a timeout. My research indicates that this happens with both “synchronous” and “asynchrounous” execution mode, as in both cases we only have either the GUI thread executing the command or the device thread. Is it possible to have multiple device threads for one device? Or other workarounds?
Thanks,
Thomas