From 82a3db85138c91df397fd820a3b5d1a0b5c21ef9 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Thu, 16 Nov 2017 16:27:47 +0000 Subject: Asynchronous logging added --- tests/activetest.cpp | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tests/activetest.cpp (limited to 'tests/activetest.cpp') diff --git a/tests/activetest.cpp b/tests/activetest.cpp new file mode 100644 index 00000000..74e72f54 --- /dev/null +++ b/tests/activetest.cpp @@ -0,0 +1,38 @@ +#include + +#include + +using namespace yage; + +void print_random() +{ + std::cout << "hello world" + << "\n"; +} + +void print_h() +{ + std::cout << "Helllllllo" + << "\n"; +} + +void flush() +{ + std::cout << "flush" << std::endl; +} + +int main() +{ + auto a = Active::create(); + + a->send(print_random); + a->send(print_h); + a->send(flush); + + std::cout << std::endl; + + for (int i = 0; i < 1000000; i++) { + } + + std::cout << std::endl; +} -- cgit