mirror of
https://github.com/sogou/workflow.git
synced 2026-10-21 22:56:42 +08:00
remove some unused constructors
This commit is contained in:
@@ -449,9 +449,10 @@ public:
|
||||
algorithm::ReduceInput<KEY, VAL>&& in,
|
||||
algorithm::reduce_function_t<KEY, VAL>&& red,
|
||||
reduce_callback_t<KEY, VAL>&& cb) :
|
||||
WFReduceTask<KEY, VAL>(queue, executor, std::move(in), std::move(cb)),
|
||||
WFReduceTask<KEY, VAL>(queue, executor, std::move(cb)),
|
||||
reduce(std::move(red))
|
||||
{
|
||||
this->in = std::move(in);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -109,17 +109,6 @@ public:
|
||||
this->error = 0;
|
||||
}
|
||||
|
||||
WFThreadTask(ExecQueue *queue, Executor *executor, INPUT&& in,
|
||||
std::function<void (WFThreadTask<INPUT, OUTPUT> *)>&& cb) :
|
||||
ExecRequest(queue, executor),
|
||||
input(std::move(in)),
|
||||
callback(std::move(cb))
|
||||
{
|
||||
this->user_data = NULL;
|
||||
this->state = WFT_STATE_UNDEFINED;
|
||||
this->error = 0;
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ~WFThreadTask() { }
|
||||
};
|
||||
|
||||
@@ -251,11 +251,6 @@ public:
|
||||
std::function<void (INPUT *, OUTPUT *)> routine,
|
||||
std::function<void (T *)> callback);
|
||||
|
||||
static T *create_thread_task(const std::string& queue_name,
|
||||
INPUT input,
|
||||
std::function<void (INPUT *, OUTPUT *)> routine,
|
||||
std::function<void (T *)> callback);
|
||||
|
||||
static MT *create_multi_thread_task(const std::string& queue_name,
|
||||
std::function<void (INPUT *, OUTPUT *)> routine,
|
||||
size_t nthreads,
|
||||
@@ -265,11 +260,6 @@ public:
|
||||
static T *create_thread_task(ExecQueue *queue, Executor *executor,
|
||||
std::function<void (INPUT *, OUTPUT *)> routine,
|
||||
std::function<void (T *)> callback);
|
||||
|
||||
static T *create_thread_task(ExecQueue *queue, Executor *executor,
|
||||
INPUT input,
|
||||
std::function<void (INPUT *, OUTPUT *)> routine,
|
||||
std::function<void (T *)> callback);
|
||||
};
|
||||
|
||||
#include "WFTaskFactory.inl"
|
||||
|
||||
@@ -834,20 +834,6 @@ WFThreadTaskFactory<INPUT, OUTPUT>::create_thread_task(const std::string& queue_
|
||||
std::move(callback));
|
||||
}
|
||||
|
||||
template<class INPUT, class OUTPUT>
|
||||
WFThreadTask<INPUT, OUTPUT> *
|
||||
WFThreadTaskFactory<INPUT, OUTPUT>::create_thread_task(const std::string& queue_name,
|
||||
INPUT input,
|
||||
std::function<void (INPUT *, OUTPUT *)> routine,
|
||||
std::function<void (WFThreadTask<INPUT, OUTPUT> *)> callback)
|
||||
{
|
||||
return new __WFThreadTask<INPUT, OUTPUT>(WFGlobal::get_exec_queue(queue_name),
|
||||
WFGlobal::get_compute_executor(),
|
||||
std::move(input),
|
||||
std::move(routine),
|
||||
std::move(callback));
|
||||
}
|
||||
|
||||
template<class INPUT, class OUTPUT>
|
||||
WFThreadTask<INPUT, OUTPUT> *
|
||||
WFThreadTaskFactory<INPUT, OUTPUT>::create_thread_task(ExecQueue *queue, Executor *executor,
|
||||
@@ -859,19 +845,6 @@ WFThreadTaskFactory<INPUT, OUTPUT>::create_thread_task(ExecQueue *queue, Executo
|
||||
std::move(callback));
|
||||
}
|
||||
|
||||
template<class INPUT, class OUTPUT>
|
||||
WFThreadTask<INPUT, OUTPUT> *
|
||||
WFThreadTaskFactory<INPUT, OUTPUT>::create_thread_task(ExecQueue *queue, Executor *executor,
|
||||
INPUT input,
|
||||
std::function<void (INPUT *, OUTPUT *)> routine,
|
||||
std::function<void (WFThreadTask<INPUT, OUTPUT> *)> callback)
|
||||
{
|
||||
return new __WFThreadTask<INPUT, OUTPUT>(queue, executor,
|
||||
std::move(input),
|
||||
std::move(routine),
|
||||
std::move(callback));
|
||||
}
|
||||
|
||||
template<class INPUT, class OUTPUT>
|
||||
class __WFThreadTask__ : public __WFThreadTask<INPUT, OUTPUT>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user