| Iris Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
#define IRIS_WSSCHEDULER_CONST (obj) IrisWSScheduler; IrisScheduler* iris_wsscheduler_new (void); IrisScheduler* iris_wsscheduler_new_full (guint min_threads, guint max_threads);
IrisWSScheduler is a work-stealing scheduler implementation for iris. It uses an IrisWSQueue per thread for storing work items yielded from the the worker thread itself. Since this can be done lock-less in some situations, it helps when workloads create many recursive tasks.
A global queue is used for work items generated from outside the schedulers set of threads. If a new work-item is created from the schedulers thread, it will be put into a private queue for the running thread.
To prevent thread-starvation, if a thread runs out of work items it will try to steal work from other threads.
The IrisWSScheduler has not yet been proven for correctness. Until that happens you should test your work-loads appropriately.
IrisScheduler* iris_wsscheduler_new (void);
Creates a new instance of the work-stealing scheduler.
Returns : |
the newly created IrisWSScheduler. |
IrisScheduler* iris_wsscheduler_new_full (guint min_threads, guint max_threads);
Creates a new instance of the work-stealing scheduler with a specified range of active threads.
|
a guint containing the minimum number of threads |
|
a guint containing the maximum number of threads |
Returns : |
the newly created IrisWSScheduler. |