| 328 | } |
| 329 | |
| 330 | static void End(WebPWorker* const worker) { |
| 331 | #ifdef WEBP_USE_THREAD |
| 332 | if (worker->impl_ != NULL) { |
| 333 | WebPWorkerImpl* const impl = (WebPWorkerImpl*)worker->impl_; |
| 334 | ChangeState(worker, NOT_OK); |
| 335 | pthread_join(impl->thread_, NULL); |
| 336 | pthread_mutex_destroy(&impl->mutex_); |
| 337 | pthread_cond_destroy(&impl->condition_); |
| 338 | WebPSafeFree(impl); |
| 339 | worker->impl_ = NULL; |
| 340 | } |
| 341 | #else |
| 342 | worker->status_ = NOT_OK; |
| 343 | assert(worker->impl_ == NULL); |
| 344 | #endif |
| 345 | assert(worker->status_ == NOT_OK); |
| 346 | } |
| 347 | |
| 348 | //------------------------------------------------------------------------------ |
| 349 |
no test coverage detected