[rkward-cvs] rkward/rkward/rbackend rinterface.cpp, 1.54, 1.55 rinterface.h, 1.26, 1.27 rthread.cpp, 1.44, 1.45
Thomas Friedrichsmeier
tfry at users.sourceforge.net
Sun Sep 17 12:37:24 UTC 2006
Update of /cvsroot/rkward/rkward/rkward/rbackend
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7490/rbackend
Modified Files:
rinterface.cpp rinterface.h rthread.cpp
Log Message:
Avoid one more potential race condition during startup; make sure output of initialization commands is shown
Index: rinterface.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rbackend/rinterface.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** rinterface.h 15 Sep 2006 17:23:12 -0000 1.26
--- rinterface.h 17 Sep 2006 12:37:22 -0000 1.27
***************
*** 107,110 ****
--- 107,112 ----
/** pointer to the RKwatch. TODO: (re-)move this pointer */
RKwatch *watch;
+ /** Used (once!) to start the RThread. Need to make this separate to avoid race conditions */
+ void startThread ();
protected:
/** needed to handle the QCustomEvent s, the RThread is sending (notifications on what's happening in the backend thread) */
Index: rinterface.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rbackend/rinterface.cpp,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** rinterface.cpp 15 Sep 2006 17:23:12 -0000 1.54
--- rinterface.cpp 17 Sep 2006 12:37:22 -0000 1.55
***************
*** 80,85 ****
connect (flush_timer, SIGNAL (timeout ()), this, SLOT (flushOutput ()));
flush_timer->start (FLUSH_INTERVAL);
-
- r_thread->start ();
}
--- 80,83 ----
***************
*** 89,93 ****
}
-
RInterface::~RInterface(){
RK_TRACE (RBACKEND);
--- 87,90 ----
***************
*** 112,115 ****
--- 109,117 ----
}
+ void RInterface::startThread () {
+ RK_TRACE (RBACKEND);
+ r_thread->start ();
+ }
+
RCommand *RInterface::runningCommand () {
return r_thread->current_command;
Index: rthread.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rbackend/rthread.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** rthread.cpp 15 Sep 2006 10:50:48 -0000 1.44
--- rthread.cpp 17 Sep 2006 12:37:22 -0000 1.45
***************
*** 26,29 ****
--- 26,30 ----
#include <kapplication.h>
+ #include <klocale.h>
#include <dcopclient.h>
***************
*** 369,373 ****
// we create a fake RCommand to capture all the output/errors during startup
! current_command = new RCommand (QString::null, RCommand::App, "R Startup");
int argc = 2;
--- 370,374 ----
// we create a fake RCommand to capture all the output/errors during startup
! current_command = new RCommand (i18n ("R Startup"), RCommand::App, i18n ("R Startup"));
int argc = 2;
More information about the rkward-tracker
mailing list