use pipe to abort select on Linux as well as macOS

This commit is contained in:
Benjamin Sergeant
2019-03-15 17:46:40 -07:00
parent b0b2f9b6d2
commit c4afb84f6e
3 changed files with 39 additions and 9 deletions

View File

@ -6,9 +6,7 @@
#include "IXSelectInterruptFactory.h"
#if defined(__linux__)
# include <ixwebsocket/IXSelectInterruptEventFd.h>
#elif defined(__APPLE__)
#if defined(__linux__) || defined(__APPLE__)
# include <ixwebsocket/IXSelectInterruptPipe.h>
#else
# include <ixwebsocket/IXSelectInterrupt.h>
@ -18,9 +16,7 @@ namespace ix
{
std::shared_ptr<SelectInterrupt> createSelectInterrupt()
{
#if defined(__linux__)
return std::make_shared<SelectInterruptEventFd>();
#elif defined(__APPLE__)
#if defined(__linux__) || defined(__APPLE__)
return std::make_shared<SelectInterruptPipe>();
#else
return std::make_shared<SelectInterrupt>();