Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[core] Better C++ usage on RunLoop
Browse files Browse the repository at this point in the history
Follow-up of #3179.
  • Loading branch information
tmpsantos committed Dec 8, 2015
1 parent cfd93a8 commit 0a97145
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions platform/default/run_loop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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();
}

Expand Down

0 comments on commit 0a97145

Please sign in to comment.