diff --git a/doc/async_worker.md b/doc/async_worker.md index 2573cd2e6..048be9e88 100644 --- a/doc/async_worker.md +++ b/doc/async_worker.md @@ -371,7 +371,7 @@ The code below shows a basic example of `Napi::AsyncWorker` the implementation: #include #include -use namespace Napi; +using namespace Napi; class EchoWorker : public AsyncWorker { public: @@ -380,12 +380,12 @@ class EchoWorker : public AsyncWorker { ~EchoWorker() {} // This code will be executed on the worker thread - void Execute() { + void Execute() override { // Need to simulate cpu heavy task std::this_thread::sleep_for(std::chrono::seconds(1)); } - void OnOK() { + void OnOK() override { HandleScope scope(Env()); Callback().Call({Env().Null(), String::New(Env(), echo)}); }