[Asterisk-Dev] busy-wait loops in pbx_dundi

Luigi Rizzo rizzo at icir.org
Fri Jun 10 01:53:51 MST 2005


while applying the timeval changes, i noticed that pbx_dundi.c
is full of busy-wait loops of the form

	while (!some_condition) {
		usleep(1);
	}

could someone comment how one avoids that this code eats 100% of the
CPU and how high the risk is ?

	thanks
	luigi



More information about the asterisk-dev mailing list