Skip to content

Commit 4b743fb

Browse files
refs #194
1 parent 656f5b8 commit 4b743fb

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

tests/abstract_thread_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class test_thread : public pthread::abstract_thread {
2121
try {
2222
long counter = 0;
2323
std::cout << std::flush << "Test thread is running..." << std::flush;
24-
pthread::this_thread::sleep_for(25 * 100);
24+
pthread::this_thread::sleep_for(2 * 100);
2525
for (auto count = 1000; count > 0; count--) {
2626
counter += count;
2727
}

tests/synchronized_queue_tests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class producer : public status, public pthread::abstract_thread {
9696
void run() throw() {
9797
#else
9898

99-
void run() noexcept {
99+
void run() noexcept override {
100100
#endif
101101
printf("start producing %d messages\n", MESSAGES_TO_PRODUCE);
102102
for (auto x = MESSAGES_TO_PRODUCE; (x > 0) && running(); x--) {
@@ -122,7 +122,7 @@ class consumer : public status, public pthread::abstract_thread {
122122
void run() throw() {
123123
#else
124124

125-
void run() noexcept {
125+
void run() noexcept override {
126126
#endif
127127

128128
printf("starting consumer\n");
@@ -139,7 +139,7 @@ class consumer : public status, public pthread::abstract_thread {
139139
}
140140

141141
if ((100 % counter()) == 0) {
142-
printf("queue's current content is %zu (thrd: %o );\n", _queue.size(), pthread::this_thread::get_id());
142+
printf("[handle 100] queue's current content is %zu (thrd: %o );\n", _queue.size(), pthread::this_thread::get_id());
143143
}
144144

145145
pthread::this_thread::sleep_for(CONSUMER_PROCESSING_DURATION);

tests/thread_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class test_runnable : public pthread::runnable {
2020
try {
2121
long counter = 0;
2222
display_message("test_runnable is running ");
23-
pthread::this_thread::sleep_for(2 * 1000);
23+
pthread::this_thread::sleep_for(2 * 100);
2424
for (auto count = 1000; count > 0; count--) {
2525
counter += count;
2626
}

0 commit comments

Comments
 (0)