X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=course%2Fsemester2%2Fpprog%2Fassignment1%2Fmthread%2Fnbody.c;h=4acf28f2c9cd382d8298b7e10f2ac59e9773fcb3;hb=19e590cc4f7dbc186cad9418bf5a2321bfa3fe1a;hp=42b97cf45acd0d45e305e35c5fe024a6c5fd18d7;hpb=f012817dee17e24eee2e8951d138dab40b808ad3;p=matches%2Fhonours.git diff --git a/course/semester2/pprog/assignment1/mthread/nbody.c b/course/semester2/pprog/assignment1/mthread/nbody.c index 42b97cf4..4acf28f2 100644 --- a/course/semester2/pprog/assignment1/mthread/nbody.c +++ b/course/semester2/pprog/assignment1/mthread/nbody.c @@ -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