aboutsummaryrefslogtreecommitdiff
path: root/example/test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'example/test.cc')
-rw-r--r--example/test.cc32
1 files changed, 0 insertions, 32 deletions
diff --git a/example/test.cc b/example/test.cc
deleted file mode 100644
index c9691f3..0000000
--- a/example/test.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Copyright (c) 2020 Johannes Stoelp */
-
-#include "lib/matcha.h"
-
-#include <cstdio>
-#include <memory>
-
-struct TestThread : public Thread {
- TestThread(const char* name) : Thread(), mName(name) {}
-
- virtual void threadFn() override {
- printf("[%s] starting up TestThread -> yield()\n", mName);
- yield();
- printf("[%s] yield() -> finishing TestThreads\n", mName);
- }
-
- private:
- const char* mName;
-};
-
-int main() {
- puts("[main] start main thread");
-
- Executor e;
- e.spawn(std::make_unique<TestThread>("Thread1"));
- e.spawn(std::make_unique<TestThread>("Thread2"));
- e.spawn(std::make_unique<TestThread>("Thread3"));
- e.run();
-
- puts("[main] finish main thread");
- return 0;
-}