update list demos
This commit is contained in:
@ -57,17 +57,17 @@ void MainMenu::run() {
|
|||||||
choosen_demo = new PreemptiveThreadDemo(3);
|
choosen_demo = new PreemptiveThreadDemo(3);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Temporary extra demos for testing
|
case 'q':
|
||||||
|
|
||||||
case '0':
|
|
||||||
choosen_demo = new ArrayListDemo();
|
choosen_demo = new ArrayListDemo();
|
||||||
break;
|
break;
|
||||||
// case '0':
|
case 'w':
|
||||||
// choosen_demo = new LinkedListDemo();
|
// NOTE: The LinkedListDemo will take considerably longer for the threadswitching part
|
||||||
// break;
|
// because for every insertion/deletion memory will be allocated for the wrappers
|
||||||
// case '0':
|
choosen_demo = new LinkedListDemo();
|
||||||
// choosen_demo = new ArrayDemo();
|
break;
|
||||||
// break;
|
case 'e':
|
||||||
|
choosen_demo = new ArrayDemo();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (choosen_demo != NULL) {
|
if (choosen_demo != NULL) {
|
||||||
|
|||||||
@ -68,7 +68,7 @@ void ArrayListDemo::run() {
|
|||||||
this->list.print(kout);
|
this->list.print(kout);
|
||||||
|
|
||||||
kout << "Starting..." << endl;
|
kout << "Starting..." << endl;
|
||||||
for (unsigned int n = 0; n < 1000; ++n) {
|
for (unsigned int n = 0; n < 10000; ++n) {
|
||||||
this->list.insert_last(active);
|
this->list.insert_last(active);
|
||||||
active = list.remove_first();
|
active = list.remove_first();
|
||||||
|
|
||||||
|
|||||||
@ -68,7 +68,7 @@ void LinkedListDemo::run() {
|
|||||||
this->list.print(kout);
|
this->list.print(kout);
|
||||||
|
|
||||||
kout << "Starting..." << endl;
|
kout << "Starting..." << endl;
|
||||||
for (unsigned int n = 0; n < 1000; ++n) {
|
for (unsigned int n = 0; n < 10000; ++n) {
|
||||||
this->list.insert_last(active);
|
this->list.insert_last(active);
|
||||||
active = list.remove_first();
|
active = list.remove_first();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user