Parallel Programming - Trivial
[matches/honours.git] / course / semester2 / pprog / assignment1 / mthread / nbody.c
index 42b97cf..4acf28f 100644 (file)
@@ -87,16 +87,11 @@ void * Compute_Thread(void * arg)
        // The main computation loop
        while (true)
        {
-               
-               if (runstate != RUN) pthread_exit(NULL); //Check whether the thread needs to exit
-
-
-       
                //Check whether the program should quit due to steps being computed, or a timeout
                if (ExitCondition())
                {
                        QuitProgram(false);
-                       continue; // The check at the start of the next loop will stop the thread
+                       pthread_exit(NULL);
                }
 
                if (options.draw_graphics == false && options.verbosity != 0 

UCC git Repository :: git.ucc.asn.au