Uh oh!
There was an error while loading. Please reload this page.
Remove const from AsyncProgressWorker::Signal and AsyncProgressQueueWorker::Signal - #1086
Remove const from AsyncProgressWorker::Signal and AsyncProgressQueueWorker::Signal#1086JosephusPaye wants to merge 9 commits into
const from AsyncProgressWorker::Signal and AsyncProgressQueueWorker::Signal#1086Conversation
KevinEady
commented
Oct 8, 2021
Hi @JosephusPaye , Thanks for your PR! We discussed this inside today's Node.js API meeting. Looking back at your original issue, you say the // 2. https://github.com/nodejs/node-addon-api/blob/4351bffd537eab927226bf6f9b66cd385a049a43/napi-inl.h#L5876template<classT>
inlinevoid AsyncProgressWorker<T>::Signal() const {
this->NonBlockingCall(static_cast<T*>(nullptr));
}
// 3. https://github.com/nodejs/node-addon-api/blob/4351bffd537eab927226bf6f9b66cd385a049a43/napi-inl.h#L5725template <typename DataType>
inline napi_status AsyncProgressWorkerBase<DataType>::NonBlockingCall(DataType* data) {
auto tsd = newAsyncProgressWorkerBase::ThreadSafeData(this, data);
return _tsfn.NonBlockingCall(tsd, OnAsyncWorkProgress);
}Have you thought about making the method in point three Thanks, Kevin |
JosephusPaye
commented
Oct 11, 2021
Hi Kevin, I went ahead and tried adding
|
JosephusPaye
commented
Oct 18, 2021
It also appears |
KevinEady
commented
Oct 22, 2021
Hi @JosephusPaye , We reviewed both of your issues here (the @legendecas will take a further look into the implementation of why |
JosephusPaye
commented
Oct 23, 2021
Sounds good! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: legendecas <legendecas@gmail.com>
This PR fixes#1081 by removing
constfrom theAsyncProgressWorker::SignalandAsyncProgressQueueWorker::Signalmethods, and also from theExecutionProgressparameter of theExecutemethod (this one might be a breaking change).Also added a test for the
AsyncProgressWorker::Signal.EDIT: Test added, butAsyncProgressQueueWorker::Signalneeds to be tested as well.AsyncProgressQueueWorker::Signal()doesn't work, needs fixing.