| 2180 | } |
| 2181 | |
| 2182 | class ExecutionProgress { |
| 2183 | friend class AsyncBareProgressWorker; |
| 2184 | public: |
| 2185 | void Signal() const { |
| 2186 | uv_mutex_lock(&that_->async_lock); |
| 2187 | uv_async_send(&that_->async); |
| 2188 | uv_mutex_unlock(&that_->async_lock); |
| 2189 | } |
| 2190 | |
| 2191 | void Send(const T* data, size_t count) const { |
| 2192 | that_->SendProgress_(data, count); |
| 2193 | } |
| 2194 | |
| 2195 | private: |
| 2196 | explicit ExecutionProgress(AsyncBareProgressWorker *that) : that_(that) {} |
| 2197 | NAN_DISALLOW_ASSIGN_COPY_MOVE(ExecutionProgress) |
| 2198 | AsyncBareProgressWorker* const that_; |
| 2199 | }; |
| 2200 | |
| 2201 | virtual void Execute(const ExecutionProgress& progress) = 0; |
| 2202 | virtual void HandleProgressCallback(const T *data, size_t size) = 0; |
nothing calls this directly
no outgoing calls
no test coverage detected