On Wed, 2007-12-19 at 18:10 -0600, Russell Bryant wrote:
Furthermore, if this loop is eating up CPU and making the system unresponsive, you can make the situation much better by adding a simple sleep that makes the process yield to to other waiting processes on each iteration of the loop. The new version would look like:
static void until_bang(t_until *x) { x->x_run = 1; x->x_count = -1; while (x->x_run && x->x_count) { x->x_count--; outlet_bang(x->x_obj.ob_outlet); usleep(1); } }
I think this is the best idea. But after writing my last post to the list, I started to wonder if Miller had a good reason for not doing this when he wrote the original code?
Jamie