#include <jobqueue.h>
Reference to a queue for IO purposes. Serial execution does not guarantee the order of execution. The queue may reorder jobs if necessary.
Public Member Functions | |
ServiceIOJobQueueRef () | |
ServiceIOJobQueueRef (ServiceIOJobQueueInterface *q) | |
ServiceIOJobQueueRef & | operator= (ServiceIOJobQueueInterface *q) |
ServiceIOJobQueueRef & | operator= (const JobQueueInterface::None &none) |
Result< UInt > | Init (JOBQUEUETYPE type, Int threadCnt, JOBQUEUEMODE mode, const Char *name)=delete |
Public Member Functions inherited from JobQueueRef | |
MAXON_DEFAULT_REFERENCE_CONSTRUCTORS (JobQueueRef, Reference) | |
MAXON_IMPLICIT | JobQueueRef (const JobQueueInterface::Current &) |
MAXON_IMPLICIT | JobQueueRef (const JobQueueInterface::None &) |
JobQueueRef & | operator= (const JobQueueInterface::Current &) |
JobQueueRef & | operator= (const JobQueueInterface::None &) |
Static Public Member Functions | |
static Result< ServiceIOJobQueueRef > | Create () |
static Result< ServiceIOJobQueueRef > | Create (Int threadCnt, JOBQUEUEMODE mode=JOBQUEUEMODE::SLEEP_ON_IDLE, const Char *name="Local Service IO Job Queue", UInt *ownerId=nullptr) |
Private Types | |
using | Super = JobQueueRef |
|
private |
|
explicit |
|
static |
Creates a local queue for asynchronous I/O and service jobs. Usually GetServiceIOQueue() is all you need but sometimes you might have to guarantee that all requests are handled by one thread (e.g. when dealing with some OS functions). In this case you can create a local IO queue with just one thread.
|
static |
Creates a local queue for asynchronous I/O and service jobs. Usually GetServiceIOQueue() is all you need but sometimes you might have to guarantee that all requests are handled by one thread (e.g. when dealing with some OS functions). In this case you can create a local IO queue with just one thread.
[in] | threadCnt | The number of threads used by the queue, 1 by default. |
[in] | mode | Scheduling options for the queue. Most of the time there's no need to specify something else than JOBQUEUEMODE::DEFAULT. |
[in] | name | The queue name, by default "Local Service IO Job Queue". |
[out] | ownerId | Owner id of the queue (can be used for CancelAndWait). |
ServiceIOJobQueueRef& operator= | ( | ServiceIOJobQueueInterface * | q | ) |
ServiceIOJobQueueRef& operator= | ( | const JobQueueInterface::None & | none | ) |
|
delete |