Alien-uv
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
libuv/include/uv/win.h view on Meta::CPAN
typedef PVOID CONDITION_VARIABLE, *PCONDITION_VARIABLE;
#endif
typedef struct _AFD_POLL_HANDLE_INFO {
HANDLE Handle;
ULONG Events;
NTSTATUS Status;
} AFD_POLL_HANDLE_INFO, *PAFD_POLL_HANDLE_INFO;
typedef struct _AFD_POLL_INFO {
LARGE_INTEGER Timeout;
ULONG NumberOfHandles;
ULONG Exclusive;
AFD_POLL_HANDLE_INFO Handles[1];
} AFD_POLL_INFO, *PAFD_POLL_INFO;
#define UV_MSAFD_PROVIDER_COUNT 3
/**
* It should be possible to cast uv_buf_t[] to WSABUF[]
libuv/src/win/poll.c view on Meta::CPAN
* When this happens, uv__fast_poll_process_poll_req will be called, and
* the pending events, if needed, will be processed in a subsequent
* request. */
return;
}
/* Setting Exclusive to TRUE makes the other poll request return if there is
* any. */
afd_poll_info->Exclusive = TRUE;
afd_poll_info->NumberOfHandles = 1;
afd_poll_info->Timeout.QuadPart = INT64_MAX;
afd_poll_info->Handles[0].Handle = (HANDLE) handle->socket;
afd_poll_info->Handles[0].Status = 0;
afd_poll_info->Handles[0].Events = 0;
if (handle->events & UV_READABLE) {
afd_poll_info->Handles[0].Events |= AFD_POLL_RECEIVE |
AFD_POLL_DISCONNECT | AFD_POLL_ACCEPT | AFD_POLL_ABORT;
} else {
if (handle->events & UV_DISCONNECT) {
afd_poll_info->Handles[0].Events |= AFD_POLL_DISCONNECT;
libuv/src/win/tty.c view on Meta::CPAN
uv_tty_update_virtual_window(&info);
uv_sem_post(&uv_tty_output_lock);
*width = uv_tty_virtual_width;
*height = uv_tty_virtual_height;
return 0;
}
static void CALLBACK uv_tty_post_raw_read(void* data, BOOLEAN didTimeout) {
uv_loop_t* loop;
uv_tty_t* handle;
uv_req_t* req;
assert(data);
assert(!didTimeout);
req = (uv_req_t*) data;
handle = (uv_tty_t*) req->data;
loop = handle->loop;
UnregisterWait(handle->tty.rd.read_raw_wait);
handle->tty.rd.read_raw_wait = NULL;
SET_REQ_SUCCESS(req);
POST_COMPLETION_FOR_REQ(loop, req);
libuv/test/runner-unix.c view on Meta::CPAN
for (;;) {
/* Check that gettimeofday() doesn't jump back in time. */
assert(tv.tv_sec > timebase.tv_sec ||
(tv.tv_sec == timebase.tv_sec && tv.tv_usec >= timebase.tv_usec));
elapsed_ms =
(tv.tv_sec - timebase.tv_sec) * 1000 +
(tv.tv_usec / 1000) -
(timebase.tv_usec / 1000);
r = 0; /* Timeout. */
if (elapsed_ms >= (unsigned) timeout)
break;
tv.tv_sec = (timeout - elapsed_ms) / 1000;
tv.tv_usec = (timeout - elapsed_ms) % 1000 * 1000;
FD_ZERO(&fds);
FD_SET(args.pipe[0], &fds);
r = select(args.pipe[0] + 1, &fds, NULL, NULL, &tv);
libuv/test/test-callback-stack.c view on Meta::CPAN
}
nested--;
}
}
static void timer_cb(uv_timer_t* handle) {
ASSERT(handle == &timer);
ASSERT(nested == 0 && "timer_cb must be called from a fresh stack");
puts("Timeout complete. Now read data...");
nested++;
if (uv_read_start((uv_stream_t*)&client, alloc_cb, read_cb)) {
FATAL("uv_read_start failed");
}
nested--;
timer_cb_called++;
uv_close((uv_handle_t*)handle, close_cb);
libuv/test/test-condvar.c view on Meta::CPAN
/* We wait-then-signal. */
wc.wait_cond(&wc, &wc.posted_1);
wc.signal_cond(&wc, &wc.posted_2);
ASSERT(0 == uv_thread_join(&thread));
worker_config_destroy(&wc);
return 0;
}
/* uv_cond_timedwait: One thread waits, no signal. Timeout should be delivered. */
TEST_IMPL(condvar_5) {
worker_config wc;
int r;
/* ns */
uint64_t before;
uint64_t after;
uint64_t elapsed;
uint64_t timeout;
timeout = 100 * 1000 * 1000; /* 100 ms in ns */
view all matches for this distributionview release on metacpan - search on metacpan
( run in 7.111 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-cec75d87357c )