[rkward-cvs] rkward/rkward/rbackend rinterface.cpp,1.47,1.48
Thomas Friedrichsmeier
tfry at users.sourceforge.net
Fri May 5 13:18:08 UTC 2006
Update of /cvsroot/rkward/rkward/rkward/rbackend
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2702/rkward/rbackend
Modified Files:
rinterface.cpp
Log Message:
Enable the processEvents hack in output processing.
Although it leads to a somewhat staggering output, I have timed the overall throughput
to be unaffected. Hence the benefits (commands with lots of output can effectively be
interrupted) outweigh the costs.
Index: rinterface.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rbackend/rinterface.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** rinterface.cpp 5 May 2006 13:05:31 -0000 1.47
--- rinterface.cpp 5 May 2006 13:18:06 -0000 1.48
***************
*** 119,128 ****
watch->addOutput (container->command, container->output);
delete container;
! /* TODO: not quite good, yet, but something like this should be done:
// output events can easily stack up in the hundreds, not allowing GUI events to get through. Let's block further output events for a minute (using MUTEX_LOCK) and then catch up with the event queue
MUTEX_LOCK;
qApp->processEvents ();
MUTEX_UNLOCK;
- */
} else if (e->type () == RCOMMAND_IN_EVENT) {
watch->addInput (static_cast <RCommand *> (e->data ()));
--- 119,128 ----
watch->addOutput (container->command, container->output);
delete container;
!
! // TODO: not quite good, yet, leads to staggering output (but overall throughput is the same):
// output events can easily stack up in the hundreds, not allowing GUI events to get through. Let's block further output events for a minute (using MUTEX_LOCK) and then catch up with the event queue
MUTEX_LOCK;
qApp->processEvents ();
MUTEX_UNLOCK;
} else if (e->type () == RCOMMAND_IN_EVENT) {
watch->addInput (static_cast <RCommand *> (e->data ()));
More information about the rkward-tracker
mailing list