blob: 50cc74107f623a87954dff68b090e9114aecb67a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include <Main.h>
#include <Threads.h>
using namespace Balau;
class TestThread : public Thread {
virtual void * proc();
};
void * TestThread::proc() {
Printer::log(M_STATUS, "Into a thread");
return NULL;
}
void MainTask::Do() {
Printer::log(M_STATUS, "Test::Threads running.");
TestThread * t = new TestThread();
Printer::log(M_STATUS, "Starting thread");
t->threadStart();
Printer::log(M_STATUS, "Joining thread");
t->join();
Printer::log(M_STATUS, "Deleting thread");
delete t;
Printer::log(M_STATUS, "Test::Threads passed.");
}
|