mirror of
https://github.com/sogou/workflow.git
synced 2026-10-29 03:27:04 +08:00
Fix function overload resolution. (#1667)
This commit is contained in:
@@ -312,7 +312,7 @@ void KafkaClientTask::kafka_rebalance_callback(__WFKafkaTask *task)
|
||||
snprintf(name, 64, "%p.cgroup", member);
|
||||
member->mutex.unlock();
|
||||
|
||||
WFTaskFactory::signal_by_name(name, NULL, max);
|
||||
WFTaskFactory::signal_by_name(name, (void *)NULL, max);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/uio.h>
|
||||
#include <time.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <utility>
|
||||
#include <functional>
|
||||
#include <openssl/ssl.h>
|
||||
@@ -421,6 +423,33 @@ public:
|
||||
task->sub_series()->set_last_task(last);
|
||||
return task;
|
||||
}
|
||||
|
||||
public:
|
||||
/* The following functions are for overload resolution only. */
|
||||
|
||||
static int send_by_name(const std::string& mailbox_name, intptr_t msg,
|
||||
size_t max)
|
||||
{
|
||||
return WFTaskFactory::send_by_name(mailbox_name, (void *)msg, max);
|
||||
}
|
||||
|
||||
static int send_by_name(const std::string& mailbox_name, std::nullptr_t msg,
|
||||
size_t max)
|
||||
{
|
||||
return WFTaskFactory::send_by_name(mailbox_name, (void *)0, max);
|
||||
}
|
||||
|
||||
static int signal_by_name(const std::string& cond_name, intptr_t msg,
|
||||
size_t max)
|
||||
{
|
||||
return WFTaskFactory::signal_by_name(cond_name, (void *)msg, max);
|
||||
}
|
||||
|
||||
static int signal_by_name(const std::string& cond_name, std::nullptr_t msg,
|
||||
size_t max)
|
||||
{
|
||||
return WFTaskFactory::signal_by_name(cond_name, (void *)0, max);
|
||||
}
|
||||
};
|
||||
|
||||
template<class REQ, class RESP>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
#include <netdb.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
#include <functional>
|
||||
|
||||
Reference in New Issue
Block a user