mirror of
https://github.com/boostorg/fiber.git
synced 2026-02-11 11:42:23 +00:00
sched_algorithm_with_properties<> must intercept awakened() calls before forwarding control to the subclass override. That pretty much requires two different virtual methods: one for sched_algorithm subclasses WITHOUT properties, the other for sched_algorithm_with_properties subclasses. Originally we used a different name (awakened_props()), but that was bothersome. It makes more sense to use a different awakened() overload instead, one that passes in the relevant properties object. Fix examples/priority.cpp accordingly. Also delegate instantiation of a new properties object to new_properties() virtual method. Overriding this method allows you to customize allocation, instead of sched_algorithm_with_properties<> unconditionally putting the new properties object on the heap. Validate the new_properties() return value.