-
Notifications
You must be signed in to change notification settings - Fork 75
Acking the receiver (to read the message) of a completed write operation #453
Comments
I'm not sure I follow. Is there a specific issue you're facing? |
Thanks for the quick reply! The background is that we are trying to build a RPC framework using tensorpipe. The problem we are trying to figure out is: when reading from a pipe, if there is no message in the pipe (e.g., nobody writes to the pipe yet), will the reader be blocked until there is a message in the pipe, or the reader will return immediately and does nothing. Hope this can clarify the question. |
Hi Luca @lw, I think we found the answer for the above question from your comment in issue 405
A follow-up question is that, besides ibv, tensorpipe also supports uv and shm. In the case of uv and shm, is there a similar polling mechanism like ibv to notify the arrival of data in the remote side? |
The reader will be blocked until something arrives. In practice, the readDescriptor callback will only be invoked once a message arrives.
Yes, all transports behave semantically identically, you don't need to worry about the implementation details. |
It seems like read and write are independent operations in tensorpipe. E.g., if a sender and a receiver are writing into and reading from a specific pipe at the same time, it is possible that the receiver may read nothing if the read operation happens before the write. Is this correct? If so, to guarantee that a read operation can always read something from the pipe, we have to somehow acknowledge the receiver (e.g., using a poller) about the completed write?
@lw
The text was updated successfully, but these errors were encountered: