Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce support for IOCP on Windows. #97

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ext/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
$srcs << "io/event/selector/kqueue.c"
end

if have_header("windows.h")
$srcs << "io/event/selector/iocp.c"
end

have_header("sys/wait.h")

have_header("sys/eventfd.h")
Expand Down
4 changes: 4 additions & 0 deletions ext/io/event/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,8 @@ void Init_IO_Event(void)
#ifdef IO_EVENT_SELECTOR_KQUEUE
Init_IO_Event_Selector_KQueue(IO_Event_Selector);
#endif

#ifdef IO_EVENT_SELECTOR_IOCP
Init_IO_Event_Selector_IOCP(IO_Event_Selector);
#endif
}
4 changes: 4 additions & 0 deletions ext/io/event/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ void Init_IO_Event(void);
#ifdef HAVE_SYS_EVENT_H
#include "selector/kqueue.h"
#endif

#ifdef HAVE_WINDOWS_H
#include "selector/iocp.h"
#endif
Loading
Loading