[core] Better C++ usage on RunLoop

Follow-up of #3179.
This commit is contained in:
Thiago Marcos P. Santos
2015-12-08 07:05:16 -08:00
parent cfd93a803d
commit 0a97145d05

View File

@@ -56,9 +56,7 @@ RunLoop* RunLoop::Get() {
class RunLoop::Impl {
public:
Impl() = default;
uv_loop_t *loop;
uv_loop_t *loop = nullptr;
RunLoop::Type type;
std::unique_ptr<AsyncTask> async;
@@ -118,7 +116,7 @@ LOOP_HANDLE RunLoop::getLoopHandle() {
}
void RunLoop::push(std::shared_ptr<WorkTask> task) {
withMutex([&] { queue.push(task); });
withMutex([&] { queue.push(std::move(task)); });
impl->async->send();
}