mirror of
https://github.com/sogou/workflow.git
synced 2026-10-26 09:39:24 +08:00
remove useless api
This commit is contained in:
@@ -197,17 +197,7 @@ __WFCondition *__ConditionMap::find_condition(const std::string& name)
|
||||
}
|
||||
|
||||
/////////////// factory api ///////////////
|
||||
/*
|
||||
SubTask *acquire_by_name(const std::string& name, mailbox_callback_t callback)
|
||||
{
|
||||
return __SemaphoreMap::get_instance()->acquire(name, std::move(callback));
|
||||
}
|
||||
|
||||
void release_by_name(const std::string& name, void *msg)
|
||||
{
|
||||
return __SemaphoreMap::get_instance()->release(name, msg);
|
||||
}
|
||||
*/
|
||||
void WFSemTaskFactory::signal_by_name(const std::string& name, void *msg)
|
||||
{
|
||||
return __ConditionMap::get_instance()->signal(name, msg);
|
||||
@@ -303,3 +293,4 @@ WFMailboxTask *WFSemTaskFactory::create_switch_timedwait_task(WFCondition *cond,
|
||||
|
||||
return waiter;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,11 +32,6 @@
|
||||
class WFSemTaskFactory
|
||||
{
|
||||
public:
|
||||
// use semaphore by name
|
||||
static SubTask *acquire_by_name(const std::string& name, mailbox_callback_t cb);
|
||||
|
||||
static void release_by_name(const std::string& name, void *msg);
|
||||
|
||||
// use condition by name
|
||||
static void signal_by_name(const std::string& name, void *msg);
|
||||
|
||||
|
||||
@@ -44,12 +44,10 @@ public:
|
||||
{
|
||||
INIT_LIST_HEAD(&this->waiter_list);
|
||||
this->concurrency = value;
|
||||
// this->size = value;
|
||||
}
|
||||
|
||||
private:
|
||||
std::atomic<int> concurrency;
|
||||
// int size;
|
||||
};
|
||||
|
||||
class WFCondition : public WFSemaphore
|
||||
|
||||
Reference in New Issue
Block a user