1

update list demos

This commit is contained in:
2022-07-19 00:19:08 +02:00
parent 99f60383ee
commit f040aa562b
3 changed files with 11 additions and 11 deletions

View File

@ -57,17 +57,17 @@ void MainMenu::run() {
choosen_demo = new PreemptiveThreadDemo(3);
break;
// Temporary extra demos for testing
case '0':
case 'q':
choosen_demo = new ArrayListDemo();
break;
// case '0':
// choosen_demo = new LinkedListDemo();
// break;
// case '0':
// choosen_demo = new ArrayDemo();
// break;
case 'w':
// NOTE: The LinkedListDemo will take considerably longer for the threadswitching part
// because for every insertion/deletion memory will be allocated for the wrappers
choosen_demo = new LinkedListDemo();
break;
case 'e':
choosen_demo = new ArrayDemo();
break;
}
if (choosen_demo != NULL) {

View File

@ -68,7 +68,7 @@ void ArrayListDemo::run() {
this->list.print(kout);
kout << "Starting..." << endl;
for (unsigned int n = 0; n < 1000; ++n) {
for (unsigned int n = 0; n < 10000; ++n) {
this->list.insert_last(active);
active = list.remove_first();

View File

@ -68,7 +68,7 @@ void LinkedListDemo::run() {
this->list.print(kout);
kout << "Starting..." << endl;
for (unsigned int n = 0; n < 1000; ++n) {
for (unsigned int n = 0; n < 10000; ++n) {
this->list.insert_last(active);
active = list.remove_first();