is there way without using multiple threads? i found https://stackoverflow.com/a/17329626/4014896 but don't how works. shouldn't cause 100% cpu usage in example? , how can embed it, example, qt? there this: https://github.com/svalaskevicius/qt-event-dispatcher-libuv there no documentation @ all. looks seems translates example qsocket uv_tcp_socket not i'm searching for. in short - you'll either need merge 2 event loops or use separate threads , sync event handlers manually.. the first link pasted shows how process libuv events have happened since last invocation. while stated there use ~100% cpu if there no events dispatched (as keep polling). the second link (qt-event-dispatcher-libuv) project i've created tackle same problem. does, however, work described - using libuv handle qt's event loop (and doing - merges 2 event loops one). to use you'd need register event dispatcher in application using http://qt-project.org/doc/qt-5/qcore...
Comments
Post a Comment