Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
task: remove dsn namespace for task_code
Browse files Browse the repository at this point in the history
  • Loading branch information
shengofsun committed May 15, 2018
1 parent 7aaf8d5 commit 8bb543f
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions include/dsn/tool-api/task.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ extern __thread struct __tls_dsn__ tls_dsn;
class task : public ref_counter, public extensible_object<task, 4>, public transient_object
{
public:
task(dsn::task_code code, int hash = 0, service_node *node = nullptr);
task(task_code code, int hash = 0, service_node *node = nullptr);

virtual ~task();
virtual void enqueue();
Expand Down Expand Up @@ -240,7 +240,7 @@ class task : public ref_counter, public extensible_object<task, 4>, public trans

uint64_t id() const { return _task_id; }
task_state state() const { return _state.load(std::memory_order_acquire); }
dsn::task_code code() const { return _spec->code; }
task_code code() const { return _spec->code; }
task_spec &spec() const { return *_spec; }
int hash() const { return _hash; }
int delay_milliseconds() const { return _delay_milliseconds; }
Expand Down Expand Up @@ -578,12 +578,8 @@ class disk_aio
class aio_task : public task
{
public:
aio_task(dsn::task_code code,
const aio_handler &cb,
int hash = 0,
service_node *node = nullptr);

aio_task(dsn::task_code code, aio_handler &&cb, int hash = 0, service_node *node = nullptr);
aio_task(task_code code, const aio_handler &cb, int hash = 0, service_node *node = nullptr);
aio_task(task_code code, aio_handler &&cb, int hash = 0, service_node *node = nullptr);
~aio_task();

void enqueue(error_code err, size_t transferred_size);
Expand Down

0 comments on commit 8bb543f

Please sign in to comment.