mirror of
https://github.com/janet-lang/janet
synced 2025-02-08 21:10:02 +00:00
Work on kq
This commit is contained in:
parent
3905e92965
commit
f1111c135b
@ -1659,7 +1659,7 @@ static void timestamp2timespec(struct timespec *t, JanetTimestamp ts) {
|
||||
|
||||
void janet_register_stream(JanetStream *stream) {
|
||||
struct kevent kevs[2];
|
||||
EV_SETx(&kevs[1], stream->handle, EVFILT_READ, EV_ADD | EV_ENABLE | EV_CLEAR | EV_EOF, 0, 0, stream);
|
||||
EV_SETx(&kevs[0], stream->handle, EVFILT_READ, EV_ADD | EV_ENABLE | EV_CLEAR | EV_EOF, 0, 0, stream);
|
||||
EV_SETx(&kevs[1], stream->handle, EVFILT_WRITE, EV_ADD | EV_ENABLE | EV_CLEAR | EV_EOF, 0, 0, stream);
|
||||
int status;
|
||||
do {
|
||||
|
@ -326,8 +326,7 @@ static void janet_deinit_block(JanetGCObject *mem) {
|
||||
case JANET_MEMORY_TABLE:
|
||||
janet_free(((JanetTable *) mem)->data);
|
||||
break;
|
||||
case JANET_MEMORY_FIBER:
|
||||
{
|
||||
case JANET_MEMORY_FIBER: {
|
||||
JanetFiber *f = (JanetFiber *)mem;
|
||||
#ifdef JANET_EV
|
||||
if (f->ev_state && !(f->flags & JANET_FIBER_EV_FLAG_IN_FLIGHT)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user