| 127 | |
| 128 | |
| 129 | void join_thread(THREAD_TYPE thread) |
| 130 | { |
| 131 | #ifndef _POSIX_THREADS |
| 132 | int res = WaitForSingleObject(thread, INFINITE); |
| 133 | assert(res == WAIT_OBJECT_0); |
| 134 | res = CloseHandle(thread); |
| 135 | assert(res); |
| 136 | #else |
| 137 | pthread_join(thread, 0); |
| 138 | #endif |
| 139 | } |
| 140 | |
| 141 | |
| 142 |