|
Boost Users : |
Subject: Re: [Boost-users] boost asio
From: Frédéric (ufospoke_at_[hidden])
Date: 2017-10-21 07:11:31
> I got it.. Just one more point..
> You mentioned:
> after you call asyn_write/read, you wait until done==true and in your call back function, you acquire the mutex, done == true, then notify_all().
> Should this wait be not done before we call sync read/write?
> OR
> Is it that we do it after calling async read/write so that threads can do their I/O work and the actual callback functions are called sequentially?
wait right after otherwise, you will never call async_(read|write).
> Should we use interprocess_mutex and interprocess_condition instead or normal mutex and condition since different clients and the server will run in different processes ?
std::mutex and std::condition_variable are just fine.
F
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