ServiceIOJobQueueRef Class Reference 线程

#include <jobqueue.h>

Inheritance diagram for ServiceIOJobQueueRef:

详细描述

Reference to a queue for IO purposes. Serial execution does not guarantee the order of execution. The queue may reorder jobs if necessary.

公共成员函数

  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 Result < ServiceIOJobQueueRef 创建 ()
static Result < ServiceIOJobQueueRef 创建 ( Int threadCnt, JOBQUEUEMODE mode= JOBQUEUEMODE::SLEEP_ON_IDLE , const Char *name="Local Service IO Job Queue ", UInt *ownerId=nullptr)

Private Types

using  Super = JobQueueRef

Member Typedef Documentation

◆  Super

using Super = JobQueueRef
private

构造函数 & 析构函数文档编制

◆  ServiceIOJobQueueRef() [1/2]

ServiceIOJobQueueRef ( )

◆  ServiceIOJobQueueRef() [2/2]

ServiceIOJobQueueRef ( ServiceIOJobQueueInterface q )
explicit

成员函数文档编制

◆  Create() [1/2]

static Result < ServiceIOJobQueueRef > Create ( )
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.

返回
OK on success.

◆  Create() [2/2]

static Result < ServiceIOJobQueueRef > Create ( Int   threadCnt ,
JOBQUEUEMODE   mode = JOBQUEUEMODE::SLEEP_ON_IDLE ,
const Char name = "Local Service IO Job Queue" ,
UInt ownerId = nullptr  
)
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).
返回
OK on success.

◆  operator=() [1/2]

ServiceIOJobQueueRef & operator= ( ServiceIOJobQueueInterface q )

◆  operator=() [2/2]

ServiceIOJobQueueRef & operator= ( const JobQueueInterface::None &  none )

◆  Init()

Result < UInt > Init ( JOBQUEUETYPE   type ,
Int   threadCnt ,
JOBQUEUEMODE   mode ,
const Char name  
)
delete