Kyoto Cabinet
Public Member Functions | Friends
kyotocabinet::TaskQueue::Task Class Reference

Interface of a task. More...

#include <kcthread.h>

List of all members.

Public Member Functions

 Task ()
 Default constructor.
virtual ~Task ()
 Destructor.
uint64_t id () const
 Get the ID number of the task.
uint32_t thread_id () const
 Get the ID number of the worker thread.
bool aborted () const
 Check whether the thread is to be aborted.

Friends

class TaskQueue

Detailed Description

Interface of a task.


Constructor & Destructor Documentation

Default constructor.

virtual kyotocabinet::TaskQueue::Task::~Task ( ) [virtual]

Destructor.


Member Function Documentation

Get the ID number of the task.

Returns:
the ID number of the task, which is incremented from 1.

Get the ID number of the worker thread.

Returns:
the ID number of the worker thread. It is from 0 to less than the number of worker threads.

Check whether the thread is to be aborted.

Returns:
true if the thread is to be aborted, or false if not.