|
Boost Users : |
Subject: Re: [Boost-users] simultaneous async_read_some and async_write using strand
From: Igor R (boost.lists_at_[hidden])
Date: 2012-08-27 13:53:41
> Q1: If I call async_write while there is a pending async_read_some in
> a single-threaded environment, can the write complete before the read
> completes? (i.e. will I need to receive some data before the write
> goes out?)
>
> Q2: Same question, but if I am using strand to serialize the operations.
In the both case the read and write and independent, so you can't know
which completes first.
Strand only serializes handler invocations, but you can't know when
the handlers are enqueued.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net