| 29 | #endif |
| 30 | |
| 31 | void HighsTaskExecutor::ExecutorHandle::dispose() { |
| 32 | if (ptr == nullptr) return; |
| 33 | if (isMain) { |
| 34 | ptr->stopWorkerThreads(false); |
| 35 | } |
| 36 | |
| 37 | // check to see if we are the last handle and if so, delete the executor |
| 38 | if (--ptr->referenceCount == 0) { |
| 39 | cache_aligned::Deleter<HighsTaskExecutor>()(ptr); |
| 40 | } |
| 41 | |
| 42 | ptr = nullptr; |
| 43 | } |
no test coverage detected