Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Check for num_results in a loop.
Julien Laffaye committed 13 years ago
commit 943d7095dd2e002aa72fc7ba51e8a61dd68982d5
parent 9c96db7
1 file changed +1 -1
modified libpkg/pkg_repo.c
@@ -906,7 +906,7 @@ read_pkg_file(void *data)

		/* Add result to the FIFO and notify */
		pthread_mutex_lock(&d->results_m);
-
		if (d->num_results >= d->max_results) {
+
		while (d->num_results >= d->max_results) {
			pthread_cond_wait(&d->has_room, &d->results_m);
		}
		STAILQ_INSERT_TAIL(&d->results, r, next);