From f7f71d10261ecf247475935fd7479b6c64b47110 Mon Sep 17 00:00:00 2001 From: jakob lovhall Date: Tue, 21 Sep 2021 16:52:39 +0200 Subject: [PATCH] update prioritised_handlers to pop the handler before executing it --- example/cpp03/invocation/prioritised_handlers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/cpp03/invocation/prioritised_handlers.cpp b/example/cpp03/invocation/prioritised_handlers.cpp index ef3ca8b727..b2b2f6b383 100644 --- a/example/cpp03/invocation/prioritised_handlers.cpp +++ b/example/cpp03/invocation/prioritised_handlers.cpp @@ -28,8 +28,8 @@ class handler_priority_queue : public boost::asio::execution_context while (!handlers_.empty()) { queued_handler handler = handlers_.top(); - handler.execute(); handlers_.pop(); + handler.execute(); } }