~ThreadSignalSocket()
{
+ ServerInstance->SE->DelFd(this);
+ ServerInstance->SE->Close(GetFd());
}
void Notify()
SocketThread::SocketThread()
{
+ signal.sock = NULL;
int fd = eventfd(0, EFD_NONBLOCK);
if (fd < 0)
throw new CoreException("Could not create pipe " + std::string(strerror(errno)));
~ThreadSignalSocket()
{
close(send_fd);
+ ServerInstance->SE->DelFd(this);
+ ServerInstance->SE->Close(GetFd());
}
void Notify()
SocketThread::SocketThread()
{
+ signal.sock = NULL;
int fds[2];
if (pipe(fds))
throw new CoreException("Could not create pipe " + std::string(strerror(errno)));
SocketThread::~SocketThread()
{
+ if (signal.sock)
+ {
+ signal.sock->cull();
+ delete signal.sock;
+ }
}