# 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

kyotocabinet::TaskQueue::Task::Task | ( |  | ) | `[explicit]`

Default constructor.

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

Destructor.

## Member Function Documentation

uint64_t kyotocabinet::TaskQueue::Task::id | ( |  | ) | const

Get the ID number of the task.

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

uint32_t kyotocabinet::TaskQueue::Task::thread_id | ( |  | ) | const

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.

bool kyotocabinet::TaskQueue::Task::aborted | ( |  | ) | const

Check whether the thread is to be aborted.

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