IceShard 1
A personal game engine project, with development focused on 2D/2.5D games.
Loading...
Searching...
No Matches
ice::TaskThreadInfo Struct Reference

#include <ice/task_thread.hxx>

Public Attributes

bool exclusive_queue = false
 Consume all tasks from the queue instead of just one from the front.
bool sort_by_priority = false
 Enable sorting tasks by priority for this thread if 'exclusive' mode is also set.
bool wait_on_queue = true
 When the queue is empty, waits on new tasks to be pushed.
ice::usize stack_size = 0_B
 Custom stack size for the thread.
ice::TaskThreadProcedurecustom_procedure
 Uses the custom provided procedure to run tasks instead of the built-in implementations.
void * custom_procedure_userdata
 User-data associated with the custom procedure (if set).
ice::String debug_name
 Sets the name of the thread.

Member Data Documentation

◆ custom_procedure

ice::TaskThreadProcedure* ice::TaskThreadInfo::custom_procedure

Uses the custom provided procedure to run tasks instead of the built-in implementations.

Note
Note that both 'exclusive_queue' and 'sort_by_priority' are unused in such a case.

◆ custom_procedure_userdata

void* ice::TaskThreadInfo::custom_procedure_userdata

User-data associated with the custom procedure (if set).

◆ debug_name

ice::String ice::TaskThreadInfo::debug_name

Sets the name of the thread.

Note
May be ignored in some builds.

◆ exclusive_queue

bool ice::TaskThreadInfo::exclusive_queue = false

Consume all tasks from the queue instead of just one from the front.

Note
May yield better results in single-consumer multi-producer scenarios.
Executes tasks using FIFO strategy, unless 'sort_by_priority' is set.

◆ sort_by_priority

bool ice::TaskThreadInfo::sort_by_priority = false

Enable sorting tasks by priority for this thread if 'exclusive' mode is also set.

◆ stack_size

ice::usize ice::TaskThreadInfo::stack_size = 0_B

Custom stack size for the thread.

Note
If the value is '0' it will use the default size.

◆ wait_on_queue

bool ice::TaskThreadInfo::wait_on_queue = true

When the queue is empty, waits on new tasks to be pushed.

Note
This puts the thread into suspended state and it won't process any work unless notified.

The documentation for this struct was generated from the following file: