#include <aul.h>
#include <aul_rpc_port.h>
#include <glib.h>
-#include <sys/types.h>
-#include <unistd.h>
#include <atomic>
#include <mutex>
}
_W("rpc_port_proxy_destroy(%p)", proxy);
- if (getpid() == gettid()) {
- delete p;
- return RPC_PORT_ERROR_NONE;
- }
-
proxy->SetDestroying(true);
proxy->DisconnectPort();
+
g_idle_add_full(G_PRIORITY_HIGH,
[](gpointer data) -> gboolean {
auto p = static_cast<std::shared_ptr<::ProxyExt>*>(data);
delete p;
return G_SOURCE_REMOVE;
}, h, nullptr);
-
return RPC_PORT_ERROR_NONE;
}
p->SetDestroying(true);
aul_rpc_port_usr_destroy(p->GetPortName().c_str(), rpc_port_get_target_uid());
- if (getpid() == gettid()) {
- delete p;
- return RPC_PORT_ERROR_NONE;
- }
-
p->Ignore();
g_idle_add_full(G_PRIORITY_HIGH,
[](gpointer data) -> gboolean {
delete p;
return G_SOURCE_REMOVE;
}, h, nullptr);
-
return RPC_PORT_ERROR_NONE;
}