Russell Bryant wrote:
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); }
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); } }