some bits to round up the job descriptor API
This commit is contained in:
parent
2b8ac2d071
commit
bcfc1ed783
4 changed files with 30 additions and 22 deletions
|
|
@ -175,4 +175,11 @@ lumiera_job_failure (LumieraJobDefinition jobDef, JobFailureReason reason)
|
|||
REQUIRE (jobDef);
|
||||
forwardInvocation(*jobDef).signalFailure(reason);
|
||||
}
|
||||
|
||||
size_t
|
||||
lumiera_job_get_hash (LumieraJobDefinition jobDef)
|
||||
{
|
||||
REQUIRE (jobDef);
|
||||
return hash_value (forwardInvocation (*jobDef));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,6 +73,14 @@ enum JobKind
|
|||
META_JOB ///< render process self organisation
|
||||
};
|
||||
|
||||
enum JobPriority
|
||||
{
|
||||
TIMEBOUND_JOB, ///< regular job scheduled for time-bound delivery
|
||||
PAUSED_JOB, ///< @todo do we need this special state?
|
||||
ASAP_JOB, ///< job for freewheeling calculation of final results
|
||||
BACKGROUND_JOB ///< background rendering job
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @todo find out about the possible kinds of failure
|
||||
|
|
@ -314,6 +322,9 @@ void lumiera_job_invoke (LumieraJobDefinition);
|
|||
* missing deadlines or aborting a sequence of jobs */
|
||||
void lumiera_job_failure (LumieraJobDefinition, JobFailureReason);
|
||||
|
||||
/** calculate a hash value based on the Job's \em identity. */
|
||||
size_t lumiera_job_get_hash (LumieraJobDefinition);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -41,20 +41,8 @@
|
|||
#include "lib/hash-value.h"
|
||||
#include "lib/time/timevalue.hpp"
|
||||
#include "backend/engine/scheduler-frontend.hpp"
|
||||
//#include "include/dummy-player-facade.h"
|
||||
//#include "include/display-facade.h"
|
||||
//#include "proc/engine/calc-stream.hpp"
|
||||
//#include "proc/mobject/model-port.hpp"
|
||||
//#include "proc/play/timings.hpp"
|
||||
//#include "proc/play/output-slot.hpp"
|
||||
//#include "common/instancehandle.hpp"
|
||||
//#include "lib/singleton-ref.hpp"
|
||||
//#include "lib/polymorphic-value.hpp"
|
||||
//#include "lib/singleton.hpp"
|
||||
//
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
//#include <boost/scoped_ptr.hpp>
|
||||
//#include <string>
|
||||
|
||||
|
||||
|
|
@ -62,10 +50,6 @@ namespace backend{
|
|||
namespace engine {
|
||||
|
||||
// using std::string;
|
||||
// using lumiera::Subsys;
|
||||
// using lumiera::Display;
|
||||
// using lumiera::DummyPlayer;
|
||||
// using proc::play::Timings;
|
||||
using lib::time::Time;
|
||||
using lib::HashVal;
|
||||
|
||||
|
|
@ -92,13 +76,11 @@ namespace engine {
|
|||
SchedulerDiagnostics (SchedulerFrontend& sch)
|
||||
: scheduler_(sch)
|
||||
{
|
||||
UNIMPLEMENTED ("attach tracing connector");
|
||||
scheduler_.activateTracing();
|
||||
}
|
||||
|
||||
~SchedulerDiagnostics()
|
||||
{
|
||||
TODO ("detach tracing connector");
|
||||
scheduler_.disableTracing();
|
||||
}
|
||||
|
||||
|
|
@ -143,6 +125,9 @@ namespace engine {
|
|||
bool
|
||||
has_job_scheduled_at (Time deadline)
|
||||
{
|
||||
///////////////TODO this would be a classical use case for some kind of Maybe monad.
|
||||
///////////////TODO I am considering to add such a helper since quite some time, maybe really do it now??
|
||||
|
||||
UNIMPLEMENTED ("query for job scheduled for specific deadline");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,9 +76,7 @@ namespace engine {
|
|||
|
||||
JobTransaction (SchedulerFrontend* s)
|
||||
: sched_(s)
|
||||
{
|
||||
UNIMPLEMENTED ("suitable representation, link to the actual scheduler?");
|
||||
}
|
||||
{ }
|
||||
|
||||
friend class SchedulerFrontend;
|
||||
|
||||
|
|
@ -126,6 +124,14 @@ namespace engine {
|
|||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* define a set of prerequisites of the current JobTransaction.
|
||||
* @param prerequisites a set of job definitions, which need to be executed
|
||||
* successfully before any job of the current JobTransaction may be
|
||||
* invoked.
|
||||
* @note prerequisites may be nested recursively, a prerequisite transaction
|
||||
* might rely on further prerequisites
|
||||
*/
|
||||
JobTransaction&
|
||||
attach (JobTransaction const& prerequisites)
|
||||
{
|
||||
|
|
@ -136,7 +142,6 @@ namespace engine {
|
|||
JobTransaction
|
||||
startPrerequisiteTx()
|
||||
{
|
||||
UNIMPLEMENTED ("how to start a nested job definition context");
|
||||
return JobTransaction(sched_);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue