1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-18 11:19:56 +00:00

Kqueue fix.

This commit is contained in:
Calvin Rose 2023-09-25 19:17:51 -07:00
parent a6ffafb1a2
commit 82917ac6e3

View File

@ -1574,15 +1574,6 @@ static JanetTimestamp ts_now(void) {
return res;
}
static int make_epoll_events(int mask) {
int events = 0;
if (mask & JANET_ASYNC_LISTEN_READ)
events |= EPOLLIN;
if (mask & JANET_ASYNC_LISTEN_WRITE)
events |= EPOLLOUT;
return events;
}
static void janet_epoll_sync_callback(JanetEVGenericMessage msg) {
JanetListenerState *state = msg.argp;
JanetAsyncStatus status1 = JANET_ASYNC_STATUS_NOT_DONE;
@ -1919,7 +1910,7 @@ void janet_loop1_impl(int has_timeout, JanetTimestamp timeout) {
statuses[1] == JANET_ASYNC_STATUS_DONE ||
statuses[2] == JANET_ASYNC_STATUS_DONE ||
statuses[3] == JANET_ASYNC_STATUS_DONE) {
janet_unlisten(state, 0);
janet_unlisten(state);
}
}
janet_stream_checktoclose(stream);