You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This allows for arbitrary types to be sent from .send. To achieve this, the
abstract base class can be implemented with a template itself. Either at
implementation or instantiation a type MUST be declared though.
`Nan::AsyncProgressWorker` is an _abstract_ class that extends `Nan::AsyncWorker` and adds additional progress reporting callbacks that can be used during the asynchronous work execution to provide progress data back to JavaScript.
63
+
`Nan::AsyncProgressWorkerBase` is an _abstract_ class template that extends `Nan::AsyncWorker` and adds additional progress reporting callbacks that can be used during the asynchronous work execution to provide progress data back to JavaScript.
64
+
65
+
Previously the definiton of `Nan::AsyncProgressWorker` only allowed sending `const char` data. Now extending `Nan::AsyncProgressWorker` will yield an instance of the implicit `Nan::AsyncProgressWorkerBase` template with type `<char>` for compatibility.
64
66
65
67
Definition:
66
68
67
69
```c++
68
-
class AsyncProgressWorker : public AsyncWorker {
70
+
template<class T>
71
+
class AsyncProgressWorkerBase<T> : public AsyncWorker {
0 commit comments