On 07/24/2018 06:58 PM, Frank Filz wrote:
Daniel,
So I’m looking at the async API, I guess right now although the return
is passed by a callback, it’s actually always synchronous, and called
before returning from read2 or write2?
Correct.
So the callers need to be modified to be prepared for a true async
callback. If they can’t actually be async, they need to do their own
signaling (they should be prepared for an inline callback or an async
callback, for inline, they need to just do what their callback will need
to let the main function know there was an inline response, otherwise, a
non-async capable caller needs to wait on a condition variable or some
other sleep and wakeup mechanism.
Inline should just work, I think, since the caller shouldn't do anything
after calling the async API call. All callers need to be async capable,
I think. It's much simpler that way. We can just not enable async at
the bottom until all the callers are converted.
Daniel