From c92bff3c23464561cda6e0032f37da872781c394 Mon Sep 17 00:00:00 2001 From: Robin Dietzel Date: Sat, 9 Dec 2023 13:22:46 +0100 Subject: [PATCH] cleanup --- task3/main-rd.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/task3/main-rd.cpp b/task3/main-rd.cpp index 342efc2..106be35 100644 --- a/task3/main-rd.cpp +++ b/task3/main-rd.cpp @@ -3,18 +3,6 @@ #include #include -/* - * Barlas Chpt 3 Ex 12: - Create three threads, each printing out the letters A, B, and C. - The printing must adhere to these rules: - • The total number of Bs and Cs that have been output at any - point in the output string cannot exceed the total number - of As that have been output at that point. - • After a C has been output, another C cannot be output until - one or more Bs have been output. - Use semaphores to solve the problem. -*/ - struct IPrintable { ~IPrintable() = default; @@ -89,7 +77,6 @@ protected: int main(int argc, char *argv[]) { - //QCoreApplication app(argc, argv); QSemaphore lockC(1); QSemaphore lockBC(0); @@ -105,6 +92,6 @@ int main(int argc, char *argv[]) { t1.wait(); t2.wait(); t3.wait(); - //return app.exec(); + return 0; }