From d778eb33290e97ef67cab24cb75975b32674808f Mon Sep 17 00:00:00 2001 From: Katze719 Date: Tue, 31 Mar 2026 22:02:44 +0200 Subject: [PATCH] Enhance documentation in scheduled_pool.hpp to clarify task storage and dispatch order - Added details on how tasks are stored in a std::multimap and the guarantee of dispatch order for tasks with the same due time. --- include/threadschedule/scheduled_pool.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/threadschedule/scheduled_pool.hpp b/include/threadschedule/scheduled_pool.hpp index ce63655..99912b2 100644 --- a/include/threadschedule/scheduled_pool.hpp +++ b/include/threadschedule/scheduled_pool.hpp @@ -88,6 +88,9 @@ class ScheduledTaskHandle * schedule_periodic returned a handle) is guaranteed to eventually * execute, unless it is cancelled or shutdown() is called before it * becomes due. + * - Tasks are stored in a std::multimap keyed by time point. When + * multiple tasks share the same due time, they are dispatched in + * insertion order (guaranteed by std::multimap since C++11). * - Tasks that are already due and submitted to the underlying pool * before shutdown() will still execute (the pool drains its queue). * - Tasks that are not yet due at the time of shutdown() will NOT