| 55 | } |
| 56 | |
| 57 | int Recycle::destroy() { |
| 58 | _running = false; |
| 59 | // join thread; |
| 60 | if (pthread_join(_recycle_thread, NULL) != 0) { |
| 61 | LOG(WARNING) << "join recycle thread failed"; |
| 62 | } |
| 63 | // destroy lock |
| 64 | if (pthread_mutex_destroy(&_recycle_mutex) != 0) { |
| 65 | LOG(WARNING) << "destroy recycle lock failed"; |
| 66 | } |
| 67 | |
| 68 | return 0; |
| 69 | } |
| 70 | |
| 71 | /* |
| 72 | void Recycle::recycle(Dict* dict) { |