[core] Abstract main loop inside RunLoop class

This commit is contained in:
Thiago Marcos P. Santos
2015-09-01 11:09:19 +03:00
parent 1d62332204
commit d422c8cac4
11 changed files with 131 additions and 67 deletions

View File

@@ -12,7 +12,7 @@ namespace util {
class AsyncTask::Impl {
public:
Impl(std::function<void()>&& fn)
: async(RunLoop::getLoop(), [this] { runTask(); })
: async(reinterpret_cast<uv_loop_t*>(RunLoop::getLoopHandle()), [this] { runTask(); })
, task(std::move(fn)) {
}