| 230 | typename T |
| 231 | > |
| 232 | inline void register_thread_end_handler ( |
| 233 | T& obj, |
| 234 | void (T::*handler)() |
| 235 | ) |
| 236 | { |
| 237 | DLIB_ASSERT(is_dlib_thread(), |
| 238 | "\tvoid register_thread_end_handler" |
| 239 | << "\n\tYou can't register a thread end handler for a thread dlib didn't spawn." |
| 240 | ); |
| 241 | |
| 242 | threads_kernel_shared::thread_pool().register_thread_end_handler(obj,handler); |
| 243 | } |
| 244 | |
| 245 | // ---------------------------------------------------------------------------------------- |
| 246 |