use libuv event loop in the glfw view

Integrates libuv's default loop with GLFW's glfwWaitEvents() call. See https://github.com/joyent/libuv/issues/1246 for more details on integrating event loops.

fixes #149
This commit is contained in:
Konstantin Käfer
2014-04-22 16:54:55 +02:00
parent 9ff9d0edb5
commit 1ecff57829
9 changed files with 108 additions and 281 deletions

View File

@@ -341,6 +341,8 @@ void async_cancel_cb(uv_async_t * /*async*/) {
}
void thread_init_cb() {
curl_global_init(CURL_GLOBAL_ALL);
loop = uv_loop_new();
uv_async_init(loop, &async_add, async_add_cb);
uv_async_init(loop, &async_cancel, async_cancel_cb);