unix: guarantee write queue cb execution order in streams

The problem is that currently the canceled write callbacks
are being called before the already written callbacks, even
though they were queued after them.
That's what I meant.
On Jul 7, 2014 6:37 PM, "Andrius Bentkus" <notifications@github.com> wrote:

> In test/test-tcp-write-queue-order.c:
>
> > +static int close_cb_called;
> > +static int connection_cb_called;
> > +static int write_callbacks;
> > +static int write_cancelled_callbacks;
> > +
> > +
> > +static void close_cb(uv_handle_t* handle) {
> > +  close_cb_called++;
> > +}
> > +
> > +void write_cb(uv_write_t* req, int status) {
> > +  ASSERT(write_cancelled_callbacks == 0);
> > +
> > +  /* we set the last write to have content in req
> > +   * data, so we check if it was canceled as well */
> > +  if (req->data)
>
> I can't do that.
>
> Because its only 1 time equal 1.
>
> However I can assert that it gets executed one time with req->data == 1
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/joyent/libuv/pull/1359/files#r14606709>.
>