We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c697b96 commit 6f6fb1fCopy full SHA for 6f6fb1f
src/node_platform.cc
@@ -66,13 +66,13 @@ class WorkerThreadsTaskRunner::DelayedTaskScheduler {
66
}
67
68
void PostDelayedTask(std::unique_ptr<Task> task, double delay_in_seconds) {
69
- tasks_.Push(std::unique_ptr<Task>(new ScheduleTask(this, std::move(task),
70
- delay_in_seconds)));
+ tasks_.Push(std::make_unique<ScheduleTask>(this, std::move(task),
+ delay_in_seconds));
71
uv_async_send(&flush_tasks_);
72
73
74
void Stop() {
75
- tasks_.Push(std::unique_ptr<Task>(new StopTask(this)));
+ tasks_.Push(std::make_unique<StopTask>(this));
76
77
78
0 commit comments