File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -371,7 +371,7 @@ The code below shows a basic example of `Napi::AsyncWorker` the implementation:
371
371
#include < chrono>
372
372
#include < thread>
373
373
374
- use namespace Napi ;
374
+ using namespace Napi ;
375
375
376
376
class EchoWorker : public AsyncWorker {
377
377
public:
@@ -380,12 +380,12 @@ class EchoWorker : public AsyncWorker {
380
380
381
381
~EchoWorker() {}
382
382
// This code will be executed on the worker thread
383
- void Execute () {
383
+ void Execute () override {
384
384
// Need to simulate cpu heavy task
385
385
std::this_thread::sleep_for (std::chrono::seconds (1));
386
386
}
387
387
388
- void OnOK() {
388
+ void OnOK() override {
389
389
HandleScope scope(Env());
390
390
Callback ().Call({Env().Null(), String::New(Env(), echo)});
391
391
}
You can’t perform that action at this time.
0 commit comments