sleep a short time with select()

This commit is contained in:
Love Hornquist Astrand
2010-11-26 08:40:07 -08:00
parent 5991c4fc8c
commit cdf3621935

View File

@@ -339,6 +339,7 @@ heim_base_once_f(heim_base_once_t *once, void *ctx, void (*func)(void *))
HEIMDAL_MUTEX_unlock(&mutex);
while (1) {
struct timeval tv = { 0, 1000 };
select(0, NULL, NULL, NULL, &tv);
HEIMDAL_MUTEX_lock(&mutex);
if (*once == 2)
break;