KROYSDOCS
HomeWhat's newv0.1.0
C/C++ SDK / C ABI · Tasks (editor) / KroysTaskJob

KroysTaskJob

The running task, handed to Run (worker thread).

Kindstruct
Headerkroys/kroys_plugin.h
Members6
Functions3
DECLARATION

Declaration

Declared in kroys/kroys_plugin.h.

kroys_plugin.h
typedef struct KroysTaskJob { ... } KroysTaskJob;
REFERENCE

Members

Fields
#uint32_t structSize;

Size of this struct as the writer compiled it (sizeof); the reader uses it to detect members appended by later minor versions.

field
#uint32_t reserved;

Padding reserved for later use; leave it 0.

field
#void* jobContext;

Host-owned job pointer; pass it unchanged to the job's functions.

field
Functions
#int32_t (KROYS_CALL* IsCancelled)(void* jobContext);

Thread-safe; call from Run.

function pointer
#void (KROYS_CALL* Report)(void* jobContext, float fraction, const char* stage);

Thread-safe: progress 0..1 and a stage text for the Tasks panel.

function pointer
#void (KROYS_CALL* Fail)(void* jobContext, const char* message);

Thread-safe: fails the task with a message (Run then returns an error).

function pointer
Members
uint32_t structSize;
uint32_t reserved;
void* jobContext;
int32_t (KROYS_CALL* IsCancelled)(void* jobContext);
void (KROYS_CALL* Report)(void* jobContext, float fraction, const char* stage);
void (KROYS_CALL* Fail)(void* jobContext, const char* message);

KroysEngine 0.1.0 documentation, built from the engine repository by Tools/BuildDocsSite.py.