Lumiera  0.pre.03
»edit your freedom«
special-job-fun.hpp File Reference

Go to the source code of this file.

Description

A configurable one-time job to invoke some special function.

The actual operation is configured as λ-function and the instance manages itself into heap storage and automatically destroys itself after the predetermined invocation. The intended usage is to supply a specifically wired one-time »fire-and-forget« action to the Scheduler as answer so some special processing situation. The front-end handle SpecialJobFun itself is disposable and only serves as builder; even after the front-end is gone, the actual JobFunctor will maintain one self-reference — unless it is invoked...

Warning
obviously this is a dangerous tool; the user must ensure that it is at most invoked once — after that, the instance will self-destroy, leaving a dangling reference.
Todo:
WIP 12/2023 invented to help with Scheduler load testing as part of the »Playback Vertical Slice« — this idea however might be generally useful to handle one-time adjustments from within a play- or planning process.
See also
SpecialJobFun_test
TestChainLoad::ScheduleCtx::continuation() usage example

Definition in file special-job-fun.hpp.

#include "lib/handle.hpp"
#include "vault/gear/nop-job-functor.hpp"
#include "lib/time/timevalue.hpp"
#include "lib/format-string.hpp"
#include "lib/format-obj.hpp"
#include "lib/meta/util.hpp"
#include <string>
#include <memory>
#include <utility>

Classes

class  SpecialJobFun::SpecialExecutor< FUN >
 
class  SpecialFunPrototype
 Interface: JobFunctor configured to invoke a function a limited number of times. More...
 
class  SpecialJobFun
 Front-end to configure a special job functor for one-time use. More...
 

Namespaces

 vault
 Vault-Layer implementation namespace root.
 
 vault::gear
 Active working gear and plumbing.