From 99a29c1926eee84f100ad9ea59a8c33f7878c342 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Sun, 22 Dec 2002 01:28:34 +0000 Subject: "no message" svn path=/trunk/; revision=306 --- externals/grill/flext/tutorial/thread2/main.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'externals/grill/flext/tutorial/thread2/main.cpp') diff --git a/externals/grill/flext/tutorial/thread2/main.cpp b/externals/grill/flext/tutorial/thread2/main.cpp index bd6354a2..2cdc37c3 100644 --- a/externals/grill/flext/tutorial/thread2/main.cpp +++ b/externals/grill/flext/tutorial/thread2/main.cpp @@ -88,18 +88,18 @@ void thread2::m_start(int st) ToOutInt(0,count); // output loop count } - cond.Lock(); // lock conditional running = false; // change state flag - cond.Signal(); // signal changed flag to watiting "stop" method - cond.Unlock(); // unlock conditional +// cond.Lock(); // lock conditional + cond.Signal(); // signal changed flag to waiting "stop" method +// cond.Unlock(); // unlock conditional } void thread2::m_stop() { - cond.Lock(); // lock conditional +// cond.Lock(); // lock conditional stopit = true; // set termination flag - while(*(&running) || *(&blipping)) // workaround for CodeWarrior! + while(*(&running) || *(&blipping)) // workaround for CodeWarrior (doesn't honor volatile modifier!) { cond.Wait(); // wait for signal by running threads } @@ -107,7 +107,7 @@ void thread2::m_stop() // --- Here, the threads should have stopped --- stopit = false; // reset flag - cond.Unlock(); // unlock conditional +// cond.Unlock(); // unlock conditional } @@ -126,9 +126,9 @@ void thread2::m_textout() Sleep(1.f); } - cond.Lock(); // lock conditional blipping = false; // change state flag - cond.Signal(); // signal changed flag to watiting "stop" method - cond.Unlock(); // unlock conditional +// cond.Lock(); // lock conditional + cond.Signal(); // signal changed flag to waiting "stop" method +// cond.Unlock(); // unlock conditional } -- cgit v1.2.1