--- libeio/eio.c 2008/09/30 17:23:24 1.25 +++ libeio/eio.c 2008/10/12 22:30:33 1.26 @@ -606,12 +606,12 @@ { while (grp->size < grp->int2 && !EIO_CANCELLED (grp)) { - int old_len = grp->size; + grp->flags &= ~EIO_FLAG_GROUPADD; EIO_FEED (grp); /* stop if no progress has been made */ - if (old_len == grp->size) + if (!(grp->flags & EIO_FLAG_GROUPADD)) { grp->feed = 0; break; @@ -1483,6 +1483,8 @@ { assert (("cannot add requests to IO::AIO::GRP after the group finished", grp->int1 != 2)); + grp->flags |= EIO_FLAG_GROUPADD; + ++grp->size; req->grp = grp;