forked from sixonionpotatoes/commons
handle messages concurrently
This commit is contained in:
@@ -96,6 +96,7 @@ class draw_rectangle : public generic_message<Type::DRAW_RECTANGLE> {
|
||||
virtual void handle_message() override {
|
||||
spdlog::debug("draw_rectangle::handle_message()");
|
||||
spdlog::debug("Position: X = {}, Y = {}", position.x, position.y);
|
||||
spdlog::debug("handle_message sleeps for 1 sec to test concurrency");
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
}
|
||||
|
||||
@@ -113,6 +114,7 @@ class draw_pixel : public generic_message<Type::DRAW_PIXEL> {
|
||||
virtual void handle_message() override {
|
||||
spdlog::debug("draw_pixel::handle_message()");
|
||||
spdlog::debug("Color: ({}, {}, {})", color.x, color.y, color.z);
|
||||
spdlog::debug("handle_message sleeps for 1 sec to test concurrency");
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user