Logo Search packages:      
Sourcecode: rjava version File versions  Download package

void org::rosuda::JRI::Rengine::run (  )  [inline]

The implementation of the R thread. This method should not be called directly.

Definition at line 615 of file Rengine.java.

References DEBUG, idleDelay, rniIdle(), and rniRunMainLoop().

                      {
            if (DEBUG>0)
                  System.out.println("Starting R...");
        if (setupR(args)==0) {
            while (alive) {
                try {
                    if (runLoop) {                        
                                    if (DEBUG>0)
                                          System.out.println("***> launching main loop:");
                        loopRunning=true;
                        rniRunMainLoop();
                                    // actually R never returns from runMainLoop ...
                        loopRunning=false;
                                    if (DEBUG>0)
                                          System.out.println("***> main loop finished:");
                        runLoop=false;
                                    died=true;
                                    return;
                    }
                    sleep(idleDelay);
                    if (runLoop) rniIdle();
                } catch (InterruptedException ie) {
                    interrupted();
                }
            }
            died=true;
                  if (DEBUG>0)
                        System.out.println("Terminating R thread.");
        } else {
                  System.err.println("Unable to start R");
        }
    }


Generated by  Doxygen 1.6.0   Back to index