| 150 | } |
| 151 | |
| 152 | int cbm_thread_join(cbm_thread_t *t) { |
| 153 | if (WaitForSingleObject(t->handle, INFINITE) != WAIT_OBJECT_0) { |
| 154 | return CBM_NOT_FOUND; |
| 155 | } |
| 156 | CloseHandle(t->handle); |
| 157 | t->handle = NULL; |
| 158 | return 0; |
| 159 | } |
| 160 | |
| 161 | int cbm_thread_detach(cbm_thread_t *t) { |
| 162 | if (t->handle) { |
no outgoing calls