mirror of
https://github.com/janet-lang/janet
synced 2025-07-27 14:22:57 +00:00
Reformat files.
This commit is contained in:
parent
813e3fdcfd
commit
88c1cf3ee7
@ -753,18 +753,18 @@ void janet_loop1_impl(int has_timeout, JanetTimeout timeout) {
|
|||||||
if (now > to.when) {
|
if (now > to.when) {
|
||||||
waittime = 0;
|
waittime = 0;
|
||||||
} else {
|
} else {
|
||||||
waittime = (uint64_t) (to.when - now);
|
waittime = (uint64_t)(to.when - now);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
waittime = INFINITE;
|
waittime = INFINITE;
|
||||||
}
|
}
|
||||||
BOOL result = GetQueuedCompletionStatus(janet_vm_iocp, &num_bytes_transfered, &completionKey, &overlapped, (DWORD) waittime);
|
BOOL result = GetQueuedCompletionStatus(janet_vm_iocp, &num_bytes_transfered, &completionKey, &overlapped, (DWORD) waittime);
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
if (!has_timeout) {
|
if (!has_timeout) {
|
||||||
JANET_EXIT("failed to get iocp GetQueuedCompletionStatus");
|
JANET_EXIT("failed to get iocp GetQueuedCompletionStatus");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Normal event */
|
/* Normal event */
|
||||||
JanetListenerState *state = (JanetListenerState *) completionKey;
|
JanetListenerState *state = (JanetListenerState *) completionKey;
|
||||||
state->event = overlapped;
|
state->event = overlapped;
|
||||||
@ -986,7 +986,7 @@ void janet_loop1_impl(int has_timeout, JanetTimestamp timeout) {
|
|||||||
do {
|
do {
|
||||||
if (has_timeout) {
|
if (has_timeout) {
|
||||||
JanetTimestamp now = ts_now();
|
JanetTimestamp now = ts_now();
|
||||||
ready = poll(janet_vm_fds, janet_vm_fdcount, now > timeout ? 0 : (int) (timeout - now));
|
ready = poll(janet_vm_fds, janet_vm_fdcount, now > timeout ? 0 : (int)(timeout - now));
|
||||||
} else {
|
} else {
|
||||||
ready = poll(janet_vm_fds, janet_vm_fdcount, -1);
|
ready = poll(janet_vm_fds, janet_vm_fdcount, -1);
|
||||||
}
|
}
|
||||||
@ -1139,7 +1139,7 @@ static const JanetReg ev_cfuns[] = {
|
|||||||
{
|
{
|
||||||
"ev/rselect", cfun_channel_rchoice,
|
"ev/rselect", cfun_channel_rchoice,
|
||||||
JDOC("(ev/rselect & clauses)\n\n"
|
JDOC("(ev/rselect & clauses)\n\n"
|
||||||
"Similar to ev/choice, but will try clauses in a random order for fairness.")
|
"Similar to ev/choice, but will try clauses in a random order for fairness.")
|
||||||
},
|
},
|
||||||
{NULL, NULL, NULL}
|
{NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
@ -259,7 +259,7 @@ JANET_NO_RETURN static void janet_sched_read(JanetStream *stream, JanetBuffer *b
|
|||||||
WSARecv((SOCKET) stream->handle,
|
WSARecv((SOCKET) stream->handle,
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
janet_await();
|
janet_await();
|
||||||
}
|
}
|
||||||
|
|
||||||
JANET_NO_RETURN static void janet_sched_chunk(JanetStream *stream, JanetBuffer *buf, int32_t nbytes) {
|
JANET_NO_RETURN static void janet_sched_chunk(JanetStream *stream, JanetBuffer *buf, int32_t nbytes) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user